This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch] libgloss: Use both CFLAGS_FOR_TARGET and CFLAGS.


Hi,

Attached is a patch to use both CFLAGS_FOR_TARGET and CFLAGS.

It turns out that multilib options (-mfoo) are in CFLAGS.  We need
to use both CFLAGS_FOR_TARGET and CFLAGS.

Tested by building newlib.  OK to apply?

Kazu Hirata

libgloss/
2007-01-04  Kazu Hirata  <kazu@codesourcery.com>

	Merge from newlib-csl-20060320-branch:
	2006-11-06  Paul Brook  <paul@codesourcery.com>

	* arm/Makefile.in (ALL_CFLAGS): Define and use.

Index: Makefile.in
===================================================================
RCS file: /cvs/src/src/libgloss/arm/Makefile.in,v
retrieving revision 1.8
diff -u -d -p -r1.8 Makefile.in
--- Makefile.in	3 Jan 2007 16:55:25 -0000	1.8
+++ Makefile.in	4 Jan 2007 04:23:21 -0000
@@ -101,31 +101,34 @@ all: ${CRT0} ${LINUX_CRT0} ${LINUX_BSP} 
 .PHONY: test
 test:
 
+# Note that when building the library, ${MULTILIB} is not the way multilib
+# options are passed; they're passed in $(CFLAGS).
+ALL_CFLAGS=$(CFLAGS_FOR_TARGET) $(CFLAGS)
 #
 crt0.o: crt0.S
 redboot-crt0.o: redboot-crt0.S
 redboot-syscalls.o: redboot-syscalls.c $(srcdir)/../syscall.h
 
 rdpmon-crt0.o: crt0.S
-	$(CC) $(CFLAGS_FOR_TARGET) $(INCLUDES) -DARM_RDP_MONITOR -o $@ -c $<
+	$(CC) $(ALL_CFLAGS) $(INCLUDES) -DARM_RDP_MONITOR -o $@ -c $<
 
 rdimon-crt0.o: crt0.S
-	$(CC) $(CFLAGS_FOR_TARGET) $(INCLUDES) -DARM_RDI_MONITOR -o $@ -c $<
+	$(CC) $(ALL_CFLAGS) $(INCLUDES) -DARM_RDI_MONITOR -o $@ -c $<
 
 rdimon-trap.o: trap.S
-	$(CC) $(CFLAGS_FOR_TARGET) $(INCLUDES) -DARM_RDI_MONITOR -o $@ -c $<
+	$(CC) $(ALL_CFLAGS) $(INCLUDES) -DARM_RDI_MONITOR -o $@ -c $<
 
 rdimon-_exit.o: _exit.c
-	$(CC) $(CFLAGS_FOR_TARGET) $(INCLUDES) -DARM_RDI_MONITOR -o $@ -c $<
+	$(CC) $(ALL_CFLAGS) $(INCLUDES) -DARM_RDI_MONITOR -o $@ -c $<
 
 rdimon-_kill.o: _kill.c
-	$(CC) $(CFLAGS_FOR_TARGET) $(INCLUDES) -DARM_RDI_MONITOR -o $@ -c $<
+	$(CC) $(ALL_CFLAGS) $(INCLUDES) -DARM_RDI_MONITOR -o $@ -c $<
 
 rdimon-syscalls.o: syscalls.c
-	$(CC) $(CFLAGS_FOR_TARGET) $(INCLUDES) -DARM_RDI_MONITOR -o $@ -c $<
+	$(CC) $(ALL_CFLAGS) $(INCLUDES) -DARM_RDI_MONITOR -o $@ -c $<
 
 rdimon-libcfunc.o: libcfunc.c
-	$(CC) $(CFLAGS_FOR_TARGET) $(INCLUDES) -DARM_RDI_MONITOR -o $@ -c $<
+	$(CC) $(ALL_CFLAGS) $(INCLUDES) -DARM_RDI_MONITOR -o $@ -c $<
 
 $(LINUX_BSP): $(LINUX_OBJS)
 	${AR} ${ARFLAGS} $@ $^


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]