Added code so that "objcopy" picks an appropriate target architecture when

building for ARM.


git-svn-id: https://shellinabox.googlecode.com/svn/trunk@124 0da03de8-d603-11dd-86c2-0f8696b7b6f9
This commit is contained in:
zodiac@gmail.com 2009-06-21 19:41:32 +00:00
parent 2c090c8beb
commit 6dbbe62310
8 changed files with 66 additions and 228 deletions

View file

@ -87,6 +87,30 @@ shellinaboxd_LDADD = liblogging.la \
libhttp.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';; \
arm*) echo '-O elf32-littlearm -B arm';; \
esac
renamesymbols = \
sed -e 's/\(.*\/\)\([^.]*\)\([.].*\)/\1\2\3=\2 /' \
-e 't0' \
-e 's/\([^.]*\)\([.].*\)/\1\2=\1 /' \
-e 't0' \
-e 's/.*/&=& /' \
-e ':0' \
-e 's/$$/aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ/' \
-e ':1' \
-e 's/\(=[^_]*\)_\([a-z]\)\([^ ]* .*\2\)\(.\)/\1\4\3\4/' \
-e 't1' \
-e 's/.\{53\}$$//' \
-e 's/[/.]/_/g' \
-e 's/^/--redefine-sym _binary_/' \
-e 's/\([^=]*\)\(=[^ ]*\)/& \1_end\2End/' \
-e 's/\([^=]*\)\(=[^ ]*\)/& \1_start\2Start/' \
-e 's/[^ ]*\([^=]*\)=[^ ]*/-N\1_size/'
libtool: $(LIBTOOL_DEPS)
$(SHELL) ./config.status --recheck
@ -144,80 +168,17 @@ clean-local:
.css.o:
@echo objcopy "$<" "$@"
@objcopy \
-I binary `echo "$(host_cpu)" | \
grep -q '^i[0-9]86$$' && \
echo ' -O elf32-i386 -B i386' || \
echo ' -O elf64-x86-64 -B i386:x86-64'` \
`echo "$<" | sed \
-e 's/\(.*\/\)\([^.]*\)\([.].*\)/\1\2\3=\2 /' \
-e 't0' \
-e 's/\([^.]*\)\([.].*\)/\1\2=\1 /' \
-e 't0' \
-e 's/.*/&=& /' \
-e ':0' \
-e 's/$$/aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ/' \
-e ':1' \
-e 's/\(=[^_]*\)_\([a-z]\)\([^ ]* .*\2\)\(.\)/\1\4\3\4/' \
-e 't1' \
-e 's/.\{53\}$$//' \
-e 's/[/.]/_/g' \
-e 's/^/--redefine-sym _binary_/' \
-e 's/\([^=]*\)\(=[^ ]*\)/& \1_end\2End/' \
-e 's/\([^=]*\)\(=[^ ]*\)/& \1_start\2Start/' \
-e 's/[^ ]*\([^=]*\)=[^ ]*/-N\1_size/'` \
@objcopy -I binary `$(objcopyflags)` `echo "$<" | $(renamesymbols)` \
"$<" "$@"
.html.o:
@echo objcopy "$<" "$@"
@objcopy \
-I binary `echo "$(host_cpu)" | \
grep -q '^i[0-9]86$$' && \
echo ' -O elf32-i386 -B i386' || \
echo ' -O elf64-x86-64 -B i386:x86-64'` \
`echo "$<" | sed \
-e 's/\(.*\/\)\([^.]*\)\([.].*\)/\1\2\3=\2 /' \
-e 't0' \
-e 's/\([^.]*\)\([.].*\)/\1\2=\1 /' \
-e 't0' \
-e 's/.*/&=& /' \
-e ':0' \
-e 's/$$/aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ/' \
-e ':1' \
-e 's/\(=[^_]*\)_\([a-z]\)\([^ ]* .*\2\)\(.\)/\1\4\3\4/' \
-e 't1' \
-e 's/.\{53\}$$//' \
-e 's/[/.]/_/g' \
-e 's/^/--redefine-sym _binary_/' \
-e 's/\([^=]*\)\(=[^ ]*\)/& \1_end\2End/' \
-e 's/\([^=]*\)\(=[^ ]*\)/& \1_start\2Start/' \
-e 's/[^ ]*\([^=]*\)=[^ ]*/-N\1_size/'` \
@objcopy -I binary `$(objcopyflags)` `echo "$<" | $(renamesymbols)` \
"$<" "$@"
.ico.o:
@echo objcopy "$<" "$@"
@objcopy \
-I binary `echo "$(host_cpu)" | \
grep -q '^i[0-9]86$$' && \
echo ' -O elf32-i386 -B i386' || \
echo ' -O elf64-x86-64 -B i386:x86-64'` \
`echo "$<" | sed \
-e 's/\(.*\/\)\([^.]*\)\([.].*\)/\1\2\3=\2 /' \
-e 't0' \
-e 's/\([^.]*\)\([.].*\)/\1\2=\1 /' \
-e 't0' \
-e 's/.*/&=& /' \
-e ':0' \
-e 's/$$/aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ/' \
-e ':1' \
-e 's/\(=[^_]*\)_\([a-z]\)\([^ ]* .*\2\)\(.\)/\1\4\3\4/' \
-e 't1' \
-e 's/.\{53\}$$//' \
-e 's/[/.]/_/g' \
-e 's/^/--redefine-sym _binary_/' \
-e 's/\([^=]*\)\(=[^ ]*\)/& \1_end\2End/' \
-e 's/\([^=]*\)\(=[^ ]*\)/& \1_start\2Start/' \
-e 's/[^ ]*\([^=]*\)=[^ ]*/-N\1_size/'` \
@objcopy -I binary `$(objcopyflags)` `echo "$<" | $(renamesymbols)` \
"$<" "$@"
shellinabox/shell_in_a_box.o: shellinabox/shell_in_a_box.js config.h
@ -233,53 +194,11 @@ shellinabox/shell_in_a_box.o: shellinabox/shell_in_a_box.js config.h
.js.o:
@echo objcopy "$<" "$@"
@objcopy \
-I binary `echo $(host_cpu) | \
grep -q '^i[0-9]86$$' && \
echo ' -O elf32-i386 -B i386' || \
echo ' -O elf64-x86-64 -B i386:x86-64'` \
`echo "$<" | sed \
-e 's/\(.*\/\)\([^.]*\)\([.].*\)/\1\2.js=\2 /' \
-e 't0' \
-e 's/\([^.]*\)\([.].*\)/\1\2=\1 /' \
-e 't0' \
-e 's/.*/&=& /' \
-e ':0' \
-e 's/$$/aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ/' \
-e ':1' \
-e 's/\(=[^_]*\)_\([a-z]\)\([^ ]* .*\2\)\(.\)/\1\4\3\4/' \
-e 't1' \
-e 's/.\{53\}$$//' \
-e 's/[/.]/_/g' \
-e 's/^/--redefine-sym _binary_/' \
-e 's/\([^=]*\)\(=[^ ]*\)/& \1_end\2End/' \
-e 's/\([^=]*\)\(=[^ ]*\)/& \1_start\2Start/' \
-e 's/[^ ]*\([^=]*\)=[^ ]*/-N\1_size/'` \
@objcopy -I binary `$(objcopyflags)` `echo "$<" | $(renamesymbols)` \
"$<" "$@"
.wav.o:
@echo objcopy "$<" "$@"
@objcopy \
-I binary `echo "$(host_cpu)" | \
grep -q '^i[0-9]86$$' && \
echo ' -O elf32-i386 -B i386' || \
echo ' -O elf64-x86-64 -B i386:x86-64'` \
`echo "$<" | sed \
-e 's/\(.*\/\)\([^.]*\)\([.].*\)/\1\2\3=\2 /' \
-e 't0' \
-e 's/\([^.]*\)\([.].*\)/\1\2=\1 /' \
-e 't0' \
-e 's/.*/&=& /' \
-e ':0' \
-e 's/$$/aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ/' \
-e ':1' \
-e 's/\(=[^_]*\)_\([a-z]\)\([^ ]* .*\2\)\(.\)/\1\4\3\4/' \
-e 't1' \
-e 's/.\{53\}$$//' \
-e 's/[/.]/_/g' \
-e 's/^/--redefine-sym _binary_/' \
-e 's/\([^=]*\)\(=[^ ]*\)/& \1_end\2End/' \
-e 's/\([^=]*\)\(=[^ ]*\)/& \1_start\2Start/' \
-e 's/[^ ]*\([^=]*\)=[^ ]*/-N\1_size/'` \
@objcopy -I binary `$(objcopyflags)` `echo "$<" | $(renamesymbols)` \
"$<" "$@"

View file

@ -331,6 +331,30 @@ shellinaboxd_LDADD = liblogging.la \
libhttp.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';; \
arm*) echo '-O elf32-littlearm -B arm';; \
esac
renamesymbols = \
sed -e 's/\(.*\/\)\([^.]*\)\([.].*\)/\1\2\3=\2 /' \
-e 't0' \
-e 's/\([^.]*\)\([.].*\)/\1\2=\1 /' \
-e 't0' \
-e 's/.*/&=& /' \
-e ':0' \
-e 's/$$/aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ/' \
-e ':1' \
-e 's/\(=[^_]*\)_\([a-z]\)\([^ ]* .*\2\)\(.\)/\1\4\3\4/' \
-e 't1' \
-e 's/.\{53\}$$//' \
-e 's/[/.]/_/g' \
-e 's/^/--redefine-sym _binary_/' \
-e 's/\([^=]*\)\(=[^ ]*\)/& \1_end\2End/' \
-e 's/\([^=]*\)\(=[^ ]*\)/& \1_start\2Start/' \
-e 's/[^ ]*\([^=]*\)=[^ ]*/-N\1_size/'
all: config.h
$(MAKE) $(AM_MAKEFLAGS) all-am
@ -1058,80 +1082,17 @@ clean-local:
.css.o:
@echo objcopy "$<" "$@"
@objcopy \
-I binary `echo "$(host_cpu)" | \
grep -q '^i[0-9]86$$' && \
echo ' -O elf32-i386 -B i386' || \
echo ' -O elf64-x86-64 -B i386:x86-64'` \
`echo "$<" | sed \
-e 's/\(.*\/\)\([^.]*\)\([.].*\)/\1\2\3=\2 /' \
-e 't0' \
-e 's/\([^.]*\)\([.].*\)/\1\2=\1 /' \
-e 't0' \
-e 's/.*/&=& /' \
-e ':0' \
-e 's/$$/aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ/' \
-e ':1' \
-e 's/\(=[^_]*\)_\([a-z]\)\([^ ]* .*\2\)\(.\)/\1\4\3\4/' \
-e 't1' \
-e 's/.\{53\}$$//' \
-e 's/[/.]/_/g' \
-e 's/^/--redefine-sym _binary_/' \
-e 's/\([^=]*\)\(=[^ ]*\)/& \1_end\2End/' \
-e 's/\([^=]*\)\(=[^ ]*\)/& \1_start\2Start/' \
-e 's/[^ ]*\([^=]*\)=[^ ]*/-N\1_size/'` \
@objcopy -I binary `$(objcopyflags)` `echo "$<" | $(renamesymbols)` \
"$<" "$@"
.html.o:
@echo objcopy "$<" "$@"
@objcopy \
-I binary `echo "$(host_cpu)" | \
grep -q '^i[0-9]86$$' && \
echo ' -O elf32-i386 -B i386' || \
echo ' -O elf64-x86-64 -B i386:x86-64'` \
`echo "$<" | sed \
-e 's/\(.*\/\)\([^.]*\)\([.].*\)/\1\2\3=\2 /' \
-e 't0' \
-e 's/\([^.]*\)\([.].*\)/\1\2=\1 /' \
-e 't0' \
-e 's/.*/&=& /' \
-e ':0' \
-e 's/$$/aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ/' \
-e ':1' \
-e 's/\(=[^_]*\)_\([a-z]\)\([^ ]* .*\2\)\(.\)/\1\4\3\4/' \
-e 't1' \
-e 's/.\{53\}$$//' \
-e 's/[/.]/_/g' \
-e 's/^/--redefine-sym _binary_/' \
-e 's/\([^=]*\)\(=[^ ]*\)/& \1_end\2End/' \
-e 's/\([^=]*\)\(=[^ ]*\)/& \1_start\2Start/' \
-e 's/[^ ]*\([^=]*\)=[^ ]*/-N\1_size/'` \
@objcopy -I binary `$(objcopyflags)` `echo "$<" | $(renamesymbols)` \
"$<" "$@"
.ico.o:
@echo objcopy "$<" "$@"
@objcopy \
-I binary `echo "$(host_cpu)" | \
grep -q '^i[0-9]86$$' && \
echo ' -O elf32-i386 -B i386' || \
echo ' -O elf64-x86-64 -B i386:x86-64'` \
`echo "$<" | sed \
-e 's/\(.*\/\)\([^.]*\)\([.].*\)/\1\2\3=\2 /' \
-e 't0' \
-e 's/\([^.]*\)\([.].*\)/\1\2=\1 /' \
-e 't0' \
-e 's/.*/&=& /' \
-e ':0' \
-e 's/$$/aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ/' \
-e ':1' \
-e 's/\(=[^_]*\)_\([a-z]\)\([^ ]* .*\2\)\(.\)/\1\4\3\4/' \
-e 't1' \
-e 's/.\{53\}$$//' \
-e 's/[/.]/_/g' \
-e 's/^/--redefine-sym _binary_/' \
-e 's/\([^=]*\)\(=[^ ]*\)/& \1_end\2End/' \
-e 's/\([^=]*\)\(=[^ ]*\)/& \1_start\2Start/' \
-e 's/[^ ]*\([^=]*\)=[^ ]*/-N\1_size/'` \
@objcopy -I binary `$(objcopyflags)` `echo "$<" | $(renamesymbols)` \
"$<" "$@"
shellinabox/shell_in_a_box.o: shellinabox/shell_in_a_box.js config.h
@ -1147,54 +1108,12 @@ shellinabox/shell_in_a_box.o: shellinabox/shell_in_a_box.js config.h
.js.o:
@echo objcopy "$<" "$@"
@objcopy \
-I binary `echo $(host_cpu) | \
grep -q '^i[0-9]86$$' && \
echo ' -O elf32-i386 -B i386' || \
echo ' -O elf64-x86-64 -B i386:x86-64'` \
`echo "$<" | sed \
-e 's/\(.*\/\)\([^.]*\)\([.].*\)/\1\2.js=\2 /' \
-e 't0' \
-e 's/\([^.]*\)\([.].*\)/\1\2=\1 /' \
-e 't0' \
-e 's/.*/&=& /' \
-e ':0' \
-e 's/$$/aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ/' \
-e ':1' \
-e 's/\(=[^_]*\)_\([a-z]\)\([^ ]* .*\2\)\(.\)/\1\4\3\4/' \
-e 't1' \
-e 's/.\{53\}$$//' \
-e 's/[/.]/_/g' \
-e 's/^/--redefine-sym _binary_/' \
-e 's/\([^=]*\)\(=[^ ]*\)/& \1_end\2End/' \
-e 's/\([^=]*\)\(=[^ ]*\)/& \1_start\2Start/' \
-e 's/[^ ]*\([^=]*\)=[^ ]*/-N\1_size/'` \
@objcopy -I binary `$(objcopyflags)` `echo "$<" | $(renamesymbols)` \
"$<" "$@"
.wav.o:
@echo objcopy "$<" "$@"
@objcopy \
-I binary `echo "$(host_cpu)" | \
grep -q '^i[0-9]86$$' && \
echo ' -O elf32-i386 -B i386' || \
echo ' -O elf64-x86-64 -B i386:x86-64'` \
`echo "$<" | sed \
-e 's/\(.*\/\)\([^.]*\)\([.].*\)/\1\2\3=\2 /' \
-e 't0' \
-e 's/\([^.]*\)\([.].*\)/\1\2=\1 /' \
-e 't0' \
-e 's/.*/&=& /' \
-e ':0' \
-e 's/$$/aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ/' \
-e ':1' \
-e 's/\(=[^_]*\)_\([a-z]\)\([^ ]* .*\2\)\(.\)/\1\4\3\4/' \
-e 't1' \
-e 's/.\{53\}$$//' \
-e 's/[/.]/_/g' \
-e 's/^/--redefine-sym _binary_/' \
-e 's/\([^=]*\)\(=[^ ]*\)/& \1_end\2End/' \
-e 's/\([^=]*\)\(=[^ ]*\)/& \1_start\2Start/' \
-e 's/[^ ]*\([^=]*\)=[^ ]*/-N\1_size/'` \
@objcopy -I binary `$(objcopyflags)` `echo "$<" | $(renamesymbols)` \
"$<" "$@"
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.

View file

@ -132,7 +132,7 @@
#define STDC_HEADERS 1
/* Most recent revision number in the version control system */
#define VCS_REVISION "123"
#define VCS_REVISION "124"
/* Version number of package */
#define VERSION "2.8"

2
configure vendored
View file

@ -2037,7 +2037,7 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
ac_compiler_gnu=$ac_cv_c_compiler_gnu
VCS_REVISION=123
VCS_REVISION=124
cat >>confdefs.h <<_ACEOF

View file

@ -2,7 +2,7 @@ AC_PREREQ(2.57)
dnl This is the one location where the authoritative version number is stored
AC_INIT(shellinabox, 2.8, markus@shellinabox.com)
VCS_REVISION=123
VCS_REVISION=124
AC_SUBST(VCS_REVISION)
AC_DEFINE_UNQUOTED(VCS_REVISION, "${VCS_REVISION}",
[Most recent revision number in the version control system])

View file

@ -1500,7 +1500,7 @@ VT100.prototype.toggleBell = function() {
};
VT100.prototype.about = function() {
alert("VT100 Terminal Emulator " + "2.8 (revision 123)" +
alert("VT100 Terminal Emulator " + "2.8 (revision 124)" +
"\nCopyright 2008-2009 by Markus Gutschke\n" +
"For more information check http://shellinabox.com");
};

View file

@ -355,7 +355,7 @@ ShellInABox.prototype.extendContextMenu = function(entries, actions) {
};
ShellInABox.prototype.about = function() {
alert("Shell In A Box version " + "2.8 (revision 123)" +
alert("Shell In A Box version " + "2.8 (revision 124)" +
"\nCopyright 2008-2009 by Markus Gutschke\n" +
"For more information check http://shellinabox.com" +
(typeof serverSupportsSSL != 'undefined' && serverSupportsSSL ?

View file

@ -1500,7 +1500,7 @@ VT100.prototype.toggleBell = function() {
};
VT100.prototype.about = function() {
alert("VT100 Terminal Emulator " + "2.8 (revision 123)" +
alert("VT100 Terminal Emulator " + "2.8 (revision 124)" +
"\nCopyright 2008-2009 by Markus Gutschke\n" +
"For more information check http://shellinabox.com");
};