diff --git a/Makefile.am b/Makefile.am index ef5a89c..1aac935 100644 --- a/Makefile.am +++ b/Makefile.am @@ -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 = \ diff --git a/Makefile.in b/Makefile.in index 5620d3e..6630572 100644 --- a/Makefile.in +++ b/Makefile.in @@ -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 = \