summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbuild3
-rw-r--r--targets.d/amd64-linux-glibc.mk2
-rw-r--r--targets.d/i686-linux-glibc.mk2
3 files changed, 7 insertions, 0 deletions
diff --git a/build b/build
index cc320f1..f1e3e09 100755
--- a/build
+++ b/build
@@ -131,6 +131,9 @@ build-gcc-config:
STANDARD_LIBEXEC_PREFIX "$(gccexedir)/" >>"$(tm)/$(tm_file)"
printf '#define %s ""\n' STANDARD_STARTFILE_PREFIX_1 \
STANDARD_STARTFILE_PREFIX_2 >>"$(tm)/$(tm_file)"
+ [ -e "$(tm)/$(tmake_file).orig" ] || \
+ mv "$(tm)/$(tmake_file)" "$(tm)/$(tmake_file).orig"
+ sed "$(tmake_script)" "$(tm)/$(tmake_file).orig" >"$(tm)/$(tmake_file)"
build-native: build-gcc-config
oh-autobuild -B "$(builddir)" -T $(native_target) -- \
diff --git a/targets.d/amd64-linux-glibc.mk b/targets.d/amd64-linux-glibc.mk
index a541aa7..6a5589b 100644
--- a/targets.d/amd64-linux-glibc.mk
+++ b/targets.d/amd64-linux-glibc.mk
@@ -1,3 +1,5 @@
tm_file = i386/linux64.h
tm_interp_macro = GLIBC_DYNAMIC_LINKER64
+tmake_file = i386/t-linux64
+tmake_script = s|\(m64=.*\):x86_64-linux-gnu|\1:amd64-linux-glibc|
target_opts =
diff --git a/targets.d/i686-linux-glibc.mk b/targets.d/i686-linux-glibc.mk
index c51708b..324e14b 100644
--- a/targets.d/i686-linux-glibc.mk
+++ b/targets.d/i686-linux-glibc.mk
@@ -1,3 +1,5 @@
tm_file = i386/linux.h
tm_interp_macro = GLIBC_DYNAMIC_LINKER
+tmake_file = i386/t-linux
+tmake_script =
target_opts = --with-arch=i686 --with-tune=i686