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:
parent
9b0a937e35
commit
2ea8e5cc77
2 changed files with 20 additions and 18 deletions
19
Makefile.am
19
Makefile.am
|
@ -111,15 +111,16 @@ shellinaboxd_LDADD = liblogging.la \
|
||||||
shellinaboxd_LDFLAGS = -static
|
shellinaboxd_LDFLAGS = -static
|
||||||
|
|
||||||
objcopyflags = case "$(host_cpu)" in \
|
objcopyflags = case "$(host_cpu)" in \
|
||||||
i[0-9]86) echo '-O elf32-i386 -B i386';; \
|
i[0-9]86)echo '-O elf32-i386 -B i386';; \
|
||||||
x86_64) echo '-O elf64-x86-64 -B i386:x86-64';; \
|
x86_64) echo '-O elf64-x86-64 -B i386:x86-64';; \
|
||||||
*) trap 'rm -f /tmp/probe$$$$.o' EXIT; \
|
mips*) echo '-O elf32-tradlittlemips -B mips:isa32'\
|
||||||
$(CC) $(AM_CFLAGS) $(CFLAGS) -c -xc \
|
*) trap 'rm -f /tmp/probe$$$$.o' EXIT; \
|
||||||
-o /tmp/probe$$$$.o /dev/null && \
|
$(CC) $(AM_CFLAGS) $(CFLAGS) -c -xc \
|
||||||
objdump -f /tmp/probe$$$$.o | \
|
-o /tmp/probe$$$$.o /dev/null && \
|
||||||
sed -e 's/.*file format */-O /;t; \
|
objdump -f /tmp/probe$$$$.o | \
|
||||||
s/architecture: *\([^,]*\).*/-B \1/;t;\
|
sed -e 's/.*file format */-O /;t; \
|
||||||
d';; \
|
s/architecture: *\([^,]*\).*/-B \1/;t; \
|
||||||
|
d';; \
|
||||||
esac
|
esac
|
||||||
|
|
||||||
renamesymbols = \
|
renamesymbols = \
|
||||||
|
|
19
Makefile.in
19
Makefile.in
|
@ -373,15 +373,16 @@ shellinaboxd_LDADD = liblogging.la \
|
||||||
|
|
||||||
shellinaboxd_LDFLAGS = -static
|
shellinaboxd_LDFLAGS = -static
|
||||||
objcopyflags = case "$(host_cpu)" in \
|
objcopyflags = case "$(host_cpu)" in \
|
||||||
i[0-9]86) echo '-O elf32-i386 -B i386';; \
|
i[0-9]86)echo '-O elf32-i386 -B i386';; \
|
||||||
x86_64) echo '-O elf64-x86-64 -B i386:x86-64';; \
|
x86_64) echo '-O elf64-x86-64 -B i386:x86-64';; \
|
||||||
*) trap 'rm -f /tmp/probe$$$$.o' EXIT; \
|
mips*) echo '-O elf32-tradlittlemips -B mips:isa32'\
|
||||||
$(CC) $(AM_CFLAGS) $(CFLAGS) -c -xc \
|
*) trap 'rm -f /tmp/probe$$$$.o' EXIT; \
|
||||||
-o /tmp/probe$$$$.o /dev/null && \
|
$(CC) $(AM_CFLAGS) $(CFLAGS) -c -xc \
|
||||||
objdump -f /tmp/probe$$$$.o | \
|
-o /tmp/probe$$$$.o /dev/null && \
|
||||||
sed -e 's/.*file format */-O /;t; \
|
objdump -f /tmp/probe$$$$.o | \
|
||||||
s/architecture: *\([^,]*\).*/-B \1/;t;\
|
sed -e 's/.*file format */-O /;t; \
|
||||||
d';; \
|
s/architecture: *\([^,]*\).*/-B \1/;t; \
|
||||||
|
d';; \
|
||||||
esac
|
esac
|
||||||
|
|
||||||
renamesymbols = \
|
renamesymbols = \
|
||||||
|
|
Loading…
Reference in a new issue