OpenWRT builds with a toolchain that doesn't set correct entries in the ELF

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.


git-svn-id: https://shellinabox.googlecode.com/svn/trunk@203 0da03de8-d603-11dd-86c2-0f8696b7b6f9
This commit is contained in:
zodiac@gmail.com 2010-03-30 17:16:49 +00:00
parent 9b0a937e35
commit 2ea8e5cc77
2 changed files with 20 additions and 18 deletions

View file

@ -113,6 +113,7 @@ 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';; \
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 && \

View file

@ -375,6 +375,7 @@ 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';; \
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 && \