rust: fixup patches

This commit is contained in:
Cody P Schafer
2014-11-24 13:29:41 -05:00
parent 7ba2178948
commit c53c8db068
8 changed files with 45 additions and 38 deletions
@@ -1,4 +1,4 @@
From 6f38f72d23da25ef620e8042735fb7e2913d7d8f Mon Sep 17 00:00:00 2001
From a251fa8520cca2da2f7b602cd7833d9b60b51e22 Mon Sep 17 00:00:00 2001
From: Cody P Schafer <dev@codyps.com>
Date: Sat, 15 Nov 2014 20:12:48 -0500
Subject: [PATCH 1/8] platform.mk: avoid choking on i586
@@ -1,4 +1,4 @@
From 3eee2b4c16d34809e106f352d1773e8c3640c8e7 Mon Sep 17 00:00:00 2001
From c2f0af1b2b4d10abd740cd8928473c40813519af Mon Sep 17 00:00:00 2001
From: Cody P Schafer <dev@codyps.com>
Date: Mon, 17 Nov 2014 16:14:15 -0500
Subject: [PATCH 2/8] mk/rt/compiler_rt: pass LDFLAGS from
@@ -9,7 +9,7 @@ Subject: [PATCH 2/8] mk/rt/compiler_rt: pass LDFLAGS from
1 file changed, 1 insertion(+)
diff --git a/mk/rt.mk b/mk/rt.mk
index 38aec83..fefb7da 100644
index a7d6a6e..6eaff9a 100644
--- a/mk/rt.mk
+++ b/mk/rt.mk
@@ -231,6 +231,7 @@ $$(COMPRT_LIB_$(1)): $$(COMPRT_DEPS) $$(MKFILE_DEPS)
@@ -1,4 +1,4 @@
From 1a42cfe068a84c0bfcd4638146999d73cf16e447 Mon Sep 17 00:00:00 2001
From 726a8fb3a7d54d0a398f91b6477934713188db43 Mon Sep 17 00:00:00 2001
From: Cody P Schafer <dev@codyps.com>
Date: Tue, 18 Nov 2014 01:40:21 -0500
Subject: [PATCH 3/8] Target: add default target.json path:
@@ -1,4 +1,4 @@
From ccc6d1e9039f99e818a9396fc9cf178ba3e9f241 Mon Sep 17 00:00:00 2001
From 28099e9b7b919369c8bb817d240056928542e9d8 Mon Sep 17 00:00:00 2001
From: Cody P Schafer <dev@codyps.com>
Date: Tue, 18 Nov 2014 14:52:56 -0500
Subject: [PATCH 4/8] mk: for stage0, use RUSTFLAGS to override target libs dir
@@ -12,10 +12,10 @@ stage0-rustc at the appropriate location.
1 file changed, 11 insertions(+), 8 deletions(-)
diff --git a/mk/main.mk b/mk/main.mk
index a9a99f1..d81a804 100644
index 7b42c5b..1f33c0b 100644
--- a/mk/main.mk
+++ b/mk/main.mk
@@ -335,21 +335,22 @@ define SREQ
@@ -332,21 +332,22 @@ define SREQ
# Destinations of artifacts for the host compiler
HROOT$(1)_H_$(3) = $(3)/stage$(1)
HBIN$(1)_H_$(3) = $$(HROOT$(1)_H_$(3))/bin
@@ -46,7 +46,7 @@ index a9a99f1..d81a804 100644
# Preqrequisites for using the stageN compiler
ifeq ($(1),0)
HSREQ$(1)_H_$(3) = $$(HBIN$(1)_H_$(3))/rustc$$(X_$(3))
@@ -459,6 +460,7 @@ STAGE$(1)_T_$(2)_H_$(3) := \
@@ -456,6 +457,7 @@ STAGE$(1)_T_$(2)_H_$(3) := \
$$(HBIN$(1)_H_$(3))/rustc$$(X_$(3)) \
--cfg $$(CFGFLAG$(1)_T_$(2)_H_$(3)) \
$$(CFG_RUSTC_FLAGS) $$(EXTRAFLAGS_STAGE$(1)) --target=$(2)) \
@@ -54,7 +54,7 @@ index a9a99f1..d81a804 100644
$$(RUSTC_FLAGS_$(2))
PERF_STAGE$(1)_T_$(2)_H_$(3) := \
@@ -467,6 +469,7 @@ PERF_STAGE$(1)_T_$(2)_H_$(3) := \
@@ -464,6 +466,7 @@ PERF_STAGE$(1)_T_$(2)_H_$(3) := \
$$(HBIN$(1)_H_$(3))/rustc$$(X_$(3)) \
--cfg $$(CFGFLAG$(1)_T_$(2)_H_$(3)) \
$$(CFG_RUSTC_FLAGS) $$(EXTRAFLAGS_STAGE$(1)) --target=$(2)) \
@@ -1,4 +1,4 @@
From c6d434f21555bb954ed309227a07356ecab6d013 Mon Sep 17 00:00:00 2001
From 12eebaa75080cbd9cd868e2911fbef35ae490e60 Mon Sep 17 00:00:00 2001
From: Cody P Schafer <dev@codyps.com>
Date: Tue, 18 Nov 2014 13:48:14 -0500
Subject: [PATCH 5/8] mk: add missing CFG_LIBDIR_RELATIVE
@@ -1,4 +1,4 @@
From 8b13875744911f55b46d2ded522c3644d773fc2c Mon Sep 17 00:00:00 2001
From 37badf3a17f80c03e751390399f6e38a6dbb09d7 Mon Sep 17 00:00:00 2001
From: Cody P Schafer <dev@codyps.com>
Date: Mon, 24 Nov 2014 13:10:15 -0500
Subject: [PATCH 6/8] configure: support --bindir, and extend libdir to
@@ -24,7 +24,7 @@ Note that this adds the requirement of the 'realpath' tool
9 files changed, 85 insertions(+), 64 deletions(-)
diff --git a/configure b/configure
index 5ac3982..4176631 100755
index 8a6ba86..78c5aa7 100755
--- a/configure
+++ b/configure
@@ -340,6 +340,7 @@ need_cmd date
@@ -35,8 +35,8 @@ index 5ac3982..4176631 100755
msg "inspecting environment"
@@ -568,12 +569,20 @@ if [ "$CFG_OSTYPE" = "pc-windows-gnu" ] && [ "$CFG_LIBDIR_RELATIVE" != "bin" ];
err "libdir on windows should be set to 'bin'"
@@ -564,12 +565,20 @@ else
CFG_LIBDIR_RELATIVE=`echo ${CFG_LIBDIR} | cut -c$((${#CFG_PREFIX}+${CAT_INC}))-`
fi
+CFG_BINDIR_RELATIVE=bin
@@ -56,7 +56,7 @@ index 5ac3982..4176631 100755
# Validate Options
step_msg "validating $CFG_SELF args"
validate_opt
@@ -1334,6 +1343,7 @@ putvar CFG_PREFIX
@@ -1335,6 +1344,7 @@ putvar CFG_PREFIX
putvar CFG_HOST
putvar CFG_TARGET
putvar CFG_LIBDIR_RELATIVE
@@ -106,10 +106,10 @@ index 88b451f..0fba6ee 100644
$(Q)rm -R tmp/dist
diff --git a/mk/main.mk b/mk/main.mk
index d81a804..128f956 100644
index 1f33c0b..2023195 100644
--- a/mk/main.mk
+++ b/mk/main.mk
@@ -318,7 +318,9 @@ export CFG_BUILD
@@ -315,7 +315,9 @@ export CFG_BUILD
export CFG_LLVM_ROOT
export CFG_PREFIX
export CFG_LIBDIR
@@ -119,7 +119,7 @@ index d81a804..128f956 100644
export CFG_DISABLE_INJECT_STD_VERSION
######################################################################
@@ -334,7 +336,16 @@ define SREQ
@@ -331,7 +333,16 @@ define SREQ
# Destinations of artifacts for the host compiler
HROOT$(1)_H_$(3) = $(3)/stage$(1)
@@ -1,32 +1,39 @@
From 4be83a87f1cfe8a23b84216d5282bf8fb075c07d Mon Sep 17 00:00:00 2001
From fc60bd327ea3cd9909d1028dd287330127314a8a Mon Sep 17 00:00:00 2001
From: Cody P Schafer <dev@codyps.com>
Date: Mon, 24 Nov 2014 13:20:57 -0500
Subject: [PATCH 7/8] XXX: remove conflicting realpath hack
---
configure | 9 ---------
1 file changed, 9 deletions(-)
configure | 14 ++++----------
1 file changed, 4 insertions(+), 10 deletions(-)
diff --git a/configure b/configure
index 4176631..0b3486e 100755
index 78c5aa7..5a32887 100755
--- a/configure
+++ b/configure
@@ -556,15 +556,6 @@ fi
@@ -551,18 +551,12 @@ CFG_LIBDIR_RELATIVE=lib
if [ "$CFG_OSTYPE" = "pc-windows-gnu" ]
then
CFG_LIBDIR_RELATIVE=bin
- CFG_LIBDIR="${CFG_PREFIX}/${CFG_LIBDIR_RELATIVE}"
-else
- valopt libdir "${CFG_PREFIX}/${CFG_LIBDIR_RELATIVE}" "install libraries (ignored on windows platform)"
+fi
valopt libdir "${CFG_PREFIX}/${CFG_LIBDIR_RELATIVE}" "install libraries (do not set it on windows platform)"
- case "$CFG_LIBDIR" in
- "$CFG_PREFIX"/*) CAT_INC=2;;
- "$CFG_PREFIX"*) CAT_INC=1;;
- *)
- err "libdir must begin with the prefix. Use --prefix to set it accordingly.";;
- esac
+valopt libdir "${CFG_PREFIX}/${CFG_LIBDIR_RELATIVE}" "install libraries (do not set it on windows platform)"
-case "$CFG_LIBDIR" in
- "$CFG_PREFIX"/*) CAT_INC=2;;
- "$CFG_PREFIX"*) CAT_INC=1;;
- *)
- err "libdir must begin with the prefix. Use --prefix to set it accordingly.";;
-esac
-
-CFG_LIBDIR_RELATIVE=`echo ${CFG_LIBDIR} | cut -c$((${#CFG_PREFIX}+${CAT_INC}))-`
-
if [ "$CFG_OSTYPE" = "pc-windows-gnu" ] && [ "$CFG_LIBDIR_RELATIVE" != "bin" ]; then
err "libdir on windows should be set to 'bin'"
- CFG_LIBDIR_RELATIVE=`echo ${CFG_LIBDIR} | cut -c$((${#CFG_PREFIX}+${CAT_INC}))-`
+if [ "$CFG_OSTYPE" = "pc-windows-gnu" ] && [ "$CFG_LIBDIR_RELATIVE" != "bin" ]; then
+ err "libdir on windows should be set to 'bin'"
fi
CFG_BINDIR_RELATIVE=bin
--
2.1.3
@@ -1,4 +1,4 @@
From f8b2de1317f15f72b52f4b8e265b20df05081b9a Mon Sep 17 00:00:00 2001
From 10b67857441bb3430324877bc5e133021c35ac4a Mon Sep 17 00:00:00 2001
From: Cody P Schafer <dev@codyps.com>
Date: Mon, 24 Nov 2014 13:22:43 -0500
Subject: [PATCH 8/8] XXX: configure: unneeded windows check
@@ -8,10 +8,10 @@ Subject: [PATCH 8/8] XXX: configure: unneeded windows check
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/configure b/configure
index 0b3486e..931c1bf 100755
index 5a32887..f31d871 100755
--- a/configure
+++ b/configure
@@ -556,8 +556,8 @@ fi
@@ -555,8 +555,8 @@ fi
valopt libdir "${CFG_PREFIX}/${CFG_LIBDIR_RELATIVE}" "install libraries (do not set it on windows platform)"