History

ARM related Makefile changes

- Builds all four possible ARM targets when cross compiling - Adds some auto detection to select the target for native ARM builds The auto detection will select EABI if it finds /lib/ld-linux.so.3. It will select VFP floating point support when /proc/cpuinfo lists a VFP or iWMMXt coprocessor. Intel Wireless MMX does not imply VFP, but it conflicts with FPA, so VFP is the only choice (apart from yet unsupported soft-float). Daniel

Daniel Glöckner committed 18 years ago

Commit e8039671 parent 12265da1 file · +16 −4Browse files

Unified · Split

Makefile+16−4
@@ -30,14 +30,14 @@ INSTALL=install · 29 unmodified lines
3030 ifdef CONFIG_WIN32
3131 PROGS=tcc$(EXESUF)
3232 ifdef CONFIG_CROSS
33−PROGS+=c67-tcc$(EXESUF) arm-tcc$(EXESUF)
33+PROGS+=c67-tcc$(EXESUF) arm-tcc-fpa$(EXESUF) arm-tcc-fpa-ld$(EXESUF) arm-tcc-vfp$(EXESUF) arm-tcc-vfp-eabi$(EXESUF)
3434 endif
3535 PROGS+=tiny_impdef$(EXESUF) tiny_libmaker$(EXESUF)
3636 else
3737 ifeq ($(ARCH),i386)
3838 PROGS=tcc$(EXESUF)
3939 ifdef CONFIG_CROSS
40−PROGS+=arm-tcc$(EXESUF)
40+PROGS+=arm-tcc-fpa$(EXESUF) arm-tcc-fpa-ld$(EXESUF) arm-tcc-vfp$(EXESUF) arm-tcc-vfp-eabi$(EXESUF)
4141 endif
4242 endif
4343 ifeq ($(ARCH),arm)
@@ -151,8 +151,11 @@ tcc$(EXESUF): tcc.c i386-gen.c tccelf.c tccasm.c i386-asm.c tcctok.h libtcc.h i3 · 107 unmodified lines
151151 $(CC) $(CFLAGS) -o $@ $< $(LIBS)
152152 endif
153153 ifeq ($(ARCH),arm)
154+ARMFLAGS = $(if $(wildcard /lib/ld-linux.so.3),-DTCC_ARM_EABI)
155+ARMFLAGS += $(if $(shell grep -l "^Features.* \(vfp\|iwmmxt\) " /proc/cpuinfo),-DTCC_ARM_VFP)
156+
154157 tcc$(EXESUF): tcc.c arm-gen.c tccelf.c tccasm.c tcctok.h libtcc.h
155− $(CC) $(CFLAGS) -DTCC_TARGET_ARM -o $@ $< $(LIBS)
158+ $(CC) $(CFLAGS) -DTCC_TARGET_ARM $(ARMFLAGS) -o $@ $< $(LIBS)
156159 endif
157160 endif
158161
@@ -163,7 +166,16 @@ i386-tcc$(EXESUF): tcc.c i386-gen.c tccelf.c tccasm.c i386-asm.c tcctok.h libtcc · 4 unmodified lines
163166 c67-tcc$(EXESUF): tcc.c c67-gen.c tccelf.c tccasm.c tcctok.h libtcc.h tcccoff.c
164167 $(CC) $(CFLAGS) -DTCC_TARGET_C67 -o $@ $< $(LIBS)
165168
166−arm-tcc$(EXESUF): tcc.c arm-gen.c tccelf.c tccasm.c tcctok.h libtcc.h
169+arm-tcc-fpa$(EXESUF): tcc.c arm-gen.c tccelf.c tccasm.c tcctok.h libtcc.h
170+ $(CC) $(CFLAGS) -DTCC_TARGET_ARM -o $@ $< $(LIBS)
171+
172+arm-tcc-fpa-ld$(EXESUF): tcc.c arm-gen.c tccelf.c tccasm.c tcctok.h libtcc.h
173+ $(CC) $(CFLAGS) -DTCC_TARGET_ARM -DLDOUBLE_SIZE=12 -o $@ $< $(LIBS)
174+
175+arm-tcc-vfp$(EXESUF): tcc.c arm-gen.c tccelf.c tccasm.c tcctok.h libtcc.h
176+ $(CC) $(CFLAGS) -DTCC_TARGET_ARM -DTCC_ARM_VFP -o $@ $< $(LIBS)
177+
178+arm-tcc-vfp-eabi$(EXESUF): tcc.c arm-gen.c tccelf.c tccasm.c tcctok.h libtcc.h
167179 $(CC) $(CFLAGS) -DTCC_TARGET_ARM -DTCC_ARM_EABI -o $@ $< $(LIBS)
168180
169181 i386-win32-tcc$(EXESUF): tcc.c i386-gen.c tccelf.c tccasm.c i386-asm.c tcctok.h libtcc.h i386-asm.h tccpe.c

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t