summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorP. J. McDermott <pjm@nac.net>2013-04-27 20:12:12 (EDT)
committer P. J. McDermott <pjm@nac.net>2013-04-27 20:27:57 (EDT)
commitaf21d59362d83164f0c081598f0e001f8eca83a8 (patch)
tree639d0d754841b948d83cff4b462f705907ec548a
parentb540d5c3a8a5cf02b68af1f2f281e9a5ae8f6322 (diff)
Edit default ELF INTERP paths in GCC config files.
-rwxr-xr-xbuild12
-rw-r--r--targets.d/core-linux-eglibc.sh2
2 files changed, 14 insertions, 0 deletions
diff --git a/build b/build
index 6cfcad3..75f05d6 100755
--- a/build
+++ b/build
@@ -69,6 +69,18 @@ configure: $(configure_targets)
touch $@
$(build_targets): configure
+ # Set the default dynamic linker path inserted into ELF INTERP fields.
+ # These default values are in header files in gcc/config. They must be
+ # edited here rather than in a patch because any given GCC target
+ # configuration can be used by multiple ProteanOS targets.
+ set -e; \
+ . "../targets.d/$(target).sh"; \
+ mv "src/gcc/config/$${gcc_config_file}" \
+ "src/gcc/config/$${gcc_config_file}~"; \
+ define_pattern=".define $${gcc_config_interp_macro}"; \
+ sed "s|^\($${define_pattern}\) \".*\"$$|\1 \"$(elf_interp)\"|" \
+ "src/gcc/config/$${gcc_config_file}~" \
+ >"src/gcc/config/$${gcc_config_file}"
if [ "x$(target)" = 'x$(OPK_HOST_ARCH)' ]; then \
$(MAKE) -f ../build "buildnative-$(target)"; \
else \
diff --git a/targets.d/core-linux-eglibc.sh b/targets.d/core-linux-eglibc.sh
new file mode 100644
index 0000000..c5315a0
--- /dev/null
+++ b/targets.d/core-linux-eglibc.sh
@@ -0,0 +1,2 @@
+gcc_config_file='i386/linux64.h'
+gcc_config_interp_macro='GLIBC_DYNAMIC_LINKER64'