]> andersk Git - test.git/commitdiff
OpenWRT builds with a toolchain that doesn't set correct entries in the ELF
authorMarkus Gutschke <markus@shellinabox.com>
Tue, 30 Mar 2010 17:16:49 +0000 (17:16 +0000)
committerMarkus Gutschke <markus@shellinabox.com>
Tue, 30 Mar 2010 17:16:49 +0000 (17:16 +0000)
headers, giving us no way to auto-detect the architecture. We have to
hard-code the flags that we pass to objcopy. Unfortunately, we have to do
this for all MIPS targets. This could conceivably break building the code
on other MIPS targets. If that happens, we'll deal with it at that time.

Makefile.am
Makefile.in

index ef5a89ccf04608959094cd13f9a327e79136da0d..1aac9359e6d114d1b35b18951d0b19d5655fc013 100644 (file)
@@ -111,15 +111,16 @@ shellinaboxd_LDADD   = liblogging.la                                          \
 shellinaboxd_LDFLAGS = -static
 
 objcopyflags         = case "$(host_cpu)" in                                  \
-                         i[0-9]86) echo '-O elf32-i386 -B i386';;             \
-                         x86_64)   echo '-O elf64-x86-64 -B i386:x86-64';;    \
-                         *)        trap 'rm -f /tmp/probe$$$$.o' EXIT;        \
-                                   $(CC) $(AM_CFLAGS) $(CFLAGS) -c -xc        \
-                                         -o /tmp/probe$$$$.o /dev/null &&     \
-                                   objdump -f /tmp/probe$$$$.o |              \
-                                   sed -e 's/.*file format */-O /;t;          \
-                                        s/architecture: *\([^,]*\).*/-B \1/;t;\
-                                        d';;                                  \
+                         i[0-9]86)echo '-O elf32-i386 -B i386';;              \
+                         x86_64)  echo '-O elf64-x86-64 -B i386:x86-64';;     \
+                         mips*)   echo '-O elf32-tradlittlemips -B mips:isa32'\
+                         *)       trap 'rm -f /tmp/probe$$$$.o' EXIT;         \
+                                  $(CC) $(AM_CFLAGS) $(CFLAGS) -c -xc         \
+                                        -o /tmp/probe$$$$.o /dev/null &&      \
+                                  objdump -f /tmp/probe$$$$.o |               \
+                                  sed -e 's/.*file format */-O /;t;           \
+                                       s/architecture: *\([^,]*\).*/-B \1/;t; \
+                                       d';;                                   \
                        esac
 
 renamesymbols        =                                                        \
index 5620d3e5d5ad5f520f57e925ee3791a6447705ff..6630572bef2ad6b3d27a53a44afb972c1c789483 100644 (file)
@@ -373,15 +373,16 @@ shellinaboxd_LDADD = liblogging.la                                          \
 
 shellinaboxd_LDFLAGS = -static
 objcopyflags = case "$(host_cpu)" in                                  \
-                         i[0-9]86) echo '-O elf32-i386 -B i386';;             \
-                         x86_64)   echo '-O elf64-x86-64 -B i386:x86-64';;    \
-                         *)        trap 'rm -f /tmp/probe$$$$.o' EXIT;        \
-                                   $(CC) $(AM_CFLAGS) $(CFLAGS) -c -xc        \
-                                         -o /tmp/probe$$$$.o /dev/null &&     \
-                                   objdump -f /tmp/probe$$$$.o |              \
-                                   sed -e 's/.*file format */-O /;t;          \
-                                        s/architecture: *\([^,]*\).*/-B \1/;t;\
-                                        d';;                                  \
+                         i[0-9]86)echo '-O elf32-i386 -B i386';;              \
+                         x86_64)  echo '-O elf64-x86-64 -B i386:x86-64';;     \
+                         mips*)   echo '-O elf32-tradlittlemips -B mips:isa32'\
+                         *)       trap 'rm -f /tmp/probe$$$$.o' EXIT;         \
+                                  $(CC) $(AM_CFLAGS) $(CFLAGS) -c -xc         \
+                                        -o /tmp/probe$$$$.o /dev/null &&      \
+                                  objdump -f /tmp/probe$$$$.o |               \
+                                  sed -e 's/.*file format */-O /;t;           \
+                                       s/architecture: *\([^,]*\).*/-B \1/;t; \
+                                       d';;                                   \
                        esac
 
 renamesymbols = \
This page took 0.034277 seconds and 5 git commands to generate.