tb_asm: update to compile on x86_64 systems

sstrip won't happen though
This commit is contained in:
Vince Weaver 2014-12-01 14:21:28 -05:00
parent 4acb1d16c8
commit f0fc207ce7
3 changed files with 16 additions and 12 deletions

View File

@ -15,18 +15,18 @@ compress_data.o: compress_data.c
lzss.o: lzss.c lzss.o: lzss.c
gcc -O2 -Wall -c lzss.c $(CC) $(CFLAGS) -c lzss.c
lzss_new.o: lzss_new.c lzss_new.o: lzss_new.c
gcc -O2 -Wall -c lzss_new.c $(CC) $(CFLAGS) -c lzss_new.c
tb_asm: tb_asm.o ./sstrip/sstrip tb_asm: tb_asm.o ./sstrip/sstrip
ld -o tb_asm tb_asm.o ld -melf_i386 -N -o tb_asm tb_asm.o
./sstrip/sstrip tb_asm ./sstrip/sstrip tb_asm
tb_asm.o: tb_asm.s data.lzss data.labels tb_asm.o: tb_asm.s data.lzss data.labels
as -o tb_asm.o tb_asm.s as --32 -o tb_asm.o tb_asm.s
tb_asm.s: configure tb_asm.s: configure
./configure ./configure
@ -40,7 +40,7 @@ data.lzss: compress_data data.inc
configure: configure.c configure: configure.c
gcc -O2 -Wall -o configure configure.c $(CC) $(CFLAGS) -o configure configure.c
clean: clean:
rm -f *~ *.o tb_asm tb_asm.s core configure compress_data data.lzss data.header data.raw data.labels rm -f *~ *.o tb_asm tb_asm.s core configure compress_data data.lzss data.header data.raw data.labels

View File

@ -12,6 +12,7 @@
#define ARCH_SH3 11 #define ARCH_SH3 11
#define ARCH_SPARC 12 #define ARCH_SPARC 12
#define ARCH_VAX 13 #define ARCH_VAX 13
#define ARCH_X86_64 14
char *arch_names[]={ char *arch_names[]={
@ -28,5 +29,6 @@ char *arch_names[]={
"s390", "s390",
"sh3", "sh3",
"sparc", "sparc",
"vax" "vax",
"x86_64",
}; };

View File

@ -39,6 +39,8 @@ int linux_detect_arch(void) {
return ARCH_SPARC; return ARCH_SPARC;
#elif defined(__vax__) #elif defined(__vax__)
return ARCH_VAX; return ARCH_VAX;
#elif defined(__x86_64__)
return ARCH_IX86;
#else #else
return ARCH_UNKNOWN; return ARCH_UNKNOWN;
#endif #endif