diff options
author | Ranjith Kumaran <ranjith@cygnus.com> | 2000-03-17 22:48:54 +0000 |
---|---|---|
committer | Ranjith Kumaran <ranjith@cygnus.com> | 2000-03-17 22:48:54 +0000 |
commit | 03261851a10dd2d6900a0a00a7515a0a46fb5d76 (patch) | |
tree | 7c22ac6cbbc99fd5cd1b5426853be8d4fd7bfcf1 /libgloss/config/ppc.mh | |
parent | fae4c299f14fc23e2829c8656992eba21f79242a (diff) | |
download | cygnal-03261851a10dd2d6900a0a00a7515a0a46fb5d76.tar.gz cygnal-03261851a10dd2d6900a0a00a7515a0a46fb5d76.tar.bz2 cygnal-03261851a10dd2d6900a0a00a7515a0a46fb5d76.zip |
20000317 sourceware import
Diffstat (limited to 'libgloss/config/ppc.mh')
-rw-r--r-- | libgloss/config/ppc.mh | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/libgloss/config/ppc.mh b/libgloss/config/ppc.mh new file mode 100644 index 000000000..b5b8c30d2 --- /dev/null +++ b/libgloss/config/ppc.mh @@ -0,0 +1,35 @@ +NEWLIB_CFLAGS = `if [ -d ${objroot}/newlib ]; then echo -I${objroot}/newlib/targ-include -I${srcroot}/newlib/libc/include; fi` +NEWLIB_LDFLAGS = `if [ -d ${objroot}/newlib ]; then echo -B${objroot}/newlib/ -L${objroot}/newlib/; fi` + +# For the PowerPC, always add -mrelocatable-lib -mno-eabi. These are set for the +# multilibs, but are ignored when building the toplevel directory. +CFLAGS_MRELOCATABLE = -mrelocatable-lib -mno-eabi + +INCLUDES = -I. -I$(srcdir)/.. +# Note that when building the library, ${MULTILIB} is not the way multilib +# options are passed; they're passed in $(CFLAGS). +CFLAGS_FOR_TARGET = -O2 -g ${MULTILIB} ${INCLUDES} ${NEWLIB_CFLAGS} +LDFLAGS_FOR_TARGET = ${MULTILIB} ${NEWLIB_LDFLAGS} +AR_FLAGS = qc + +.c.o: + $(CC) $(CFLAGS_FOR_TARGET) $(CFLAGS_MRELOCATABLE) -O2 $(INCLUDES) -c $(CFLAGS) $< + +.C.o: + $(CC) $(CFLAGS_FOR_TARGET) $(CFLAGS_MRELOCATABLE) -O2 $(INCLUDES) -c $(CFLAGS) $< +.s.o: + $(AS) $(ASFLAGS_FOR_TARGET) $(INCLUDES) $(ASFLAGS) -o $*.o $< + +# +# GCC knows to run the preprocessor on .S files before it assembles them. +# +.S.o: + $(CC) $(CFLAGS_FOR_TARGET) $(CFLAGS_MRELOCATABLE) $(INCLUDES) $(CFLAGS) -c $< + +# +# this is a bogus target that'll produce an assembler from the +# C source with the right compiler options. this is so we can +# track down code generation or debug symbol bugs. +# +.c.s: + $(CC) $(CFLAGS_FOR_TARGET) $(CFLAGS_MRELOCATABLE) -S $(INCLUDES) $(CFLAGS) $< |