diff options
author | kan <kan@FreeBSD.org> | 2007-03-12 00:28:06 +0000 |
---|---|---|
committer | kan <kan@FreeBSD.org> | 2007-03-12 00:28:06 +0000 |
commit | f85d4141eaf405aace116263c35cd7497a8abb72 (patch) | |
tree | 029a4aa766782f8feecb4ca1c1188dc07cfdbbea /gnu/usr.bin/cc | |
parent | 44a133f2e813fcb90c74f699b232eb1c17e9ccc4 (diff) | |
download | FreeBSD-src-f85d4141eaf405aace116263c35cd7497a8abb72.zip FreeBSD-src-f85d4141eaf405aace116263c35cd7497a8abb72.tar.gz |
Minor Makefile cleanup. Do not use Makefile variables named 'version' and
'target'. Latter is problematic in particular as apparently FreeBSD's
bsd.prog.mk re-defines it under some circumstances. This causes an
unexpected failures like -dumpmachine not working for cc while working
fine for c++.
Do not re-define IN_GCC in multipe places, it gets inherited from
Makefile.in anyway.
PR: gnu/110143
Submitted by: usleepless at gmail
Diffstat (limited to 'gnu/usr.bin/cc')
-rw-r--r-- | gnu/usr.bin/cc/Makefile.fe | 6 | ||||
-rw-r--r-- | gnu/usr.bin/cc/Makefile.inc | 2 | ||||
-rw-r--r-- | gnu/usr.bin/cc/c++filt/Makefile | 3 | ||||
-rw-r--r-- | gnu/usr.bin/cc/cc_int/Makefile | 4 | ||||
-rw-r--r-- | gnu/usr.bin/cc/f77/Makefile | 2 |
5 files changed, 8 insertions, 9 deletions
diff --git a/gnu/usr.bin/cc/Makefile.fe b/gnu/usr.bin/cc/Makefile.fe index a7057b1..bfa8cb2 100644 --- a/gnu/usr.bin/cc/Makefile.fe +++ b/gnu/usr.bin/cc/Makefile.fe @@ -2,14 +2,14 @@ # Front-end-only bits -version!= sed -n /version_string/p ${GCCDIR}/version.c | sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/' +GCC_VERSION!= sed -n /version_string/p ${GCCDIR}/version.c | sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/' # # These were previously defined in gcc.c. Just copy previous values from # there. We ifdef most of them out for FREEBSD_NATIVE builds anyway. # gcc.c won't compile without them though. DRIVER_DEFINES = \ - -DDEFAULT_TARGET_VERSION=\"$(version)\" \ - -DDEFAULT_TARGET_MACHINE=\"$(target)\" \ + -DDEFAULT_TARGET_VERSION=\"$(GCC_VERSION)\" \ + -DDEFAULT_TARGET_MACHINE=\"$(GCC_TARGET)\" \ CFLAGS+= ${DRIVER_DEFINES} diff --git a/gnu/usr.bin/cc/Makefile.inc b/gnu/usr.bin/cc/Makefile.inc index 3dfbe85..27ebd21 100644 --- a/gnu/usr.bin/cc/Makefile.inc +++ b/gnu/usr.bin/cc/Makefile.inc @@ -16,7 +16,7 @@ MD_FILE= ../cc_tools/arm-diked.md .else MD_FILE= ${GCCDIR}/config/${GCC_CPU}/${GCC_CPU}.md .endif -target= ${TARGET_ARCH}-undermydesk-freebsd +GCC_TARGET= ${TARGET_ARCH}-undermydesk-freebsd CFLAGS+= -DIN_GCC -DHAVE_CONFIG_H CFLAGS+= -DPREFIX=\"${TOOLS_PREFIX}/usr\" diff --git a/gnu/usr.bin/cc/c++filt/Makefile b/gnu/usr.bin/cc/c++filt/Makefile index f912c78..4112772 100644 --- a/gnu/usr.bin/cc/c++filt/Makefile +++ b/gnu/usr.bin/cc/c++filt/Makefile @@ -1,6 +1,7 @@ # $FreeBSD$ .include "../Makefile.inc" +.include "../Makefile.fe" .PATH: ${GCCDIR} @@ -8,7 +9,7 @@ PROG= c++filt SRCS= cp-demangle.c NO_MAN= -CFLAGS+= -DSTANDALONE_DEMANGLER -DIN_GCC -DVERSION=\"$(version)\" +CFLAGS+= -DSTANDALONE_DEMANGLER -DVERSION=\"$(GCC_VERSION)\" DPADD= ${LIBCC_INT} LDADD= ${LIBCC_INT} diff --git a/gnu/usr.bin/cc/cc_int/Makefile b/gnu/usr.bin/cc/cc_int/Makefile index f2a9281..d06cebb 100644 --- a/gnu/usr.bin/cc/cc_int/Makefile +++ b/gnu/usr.bin/cc/cc_int/Makefile @@ -78,7 +78,7 @@ insn-$F.c: ${.OBJDIR}/../cc_tools/gen$F .endfor CFLAGS+= -DHAVE_CONFIG_H -CFLAGS+= -DTARGET_NAME=\"${target}\" -DIN_GCC +CFLAGS+= -DTARGET_NAME=\"${GCC_TARGET}\" .if ${TARGET_ARCH} == "arm" && defined(TARGET_BIG_ENDIAN) CFLAGS += -DTARGET_ENDIAN_DEFAULT=ARM_FLAG_BIG_END @@ -88,6 +88,6 @@ CFLAGS += -DTARGET_ENDIAN_DEFAULT=ARM_FLAG_BIG_END # pollute compiler command line for all other files. c-pch.o: c-pch.c ${CC} ${CFLAGS} -DHOST_MACHINE=\"${host}\" \ - -DTARGET_MACHINE=\"${target}\" -c ${.IMPSRC} + -DTARGET_MACHINE=\"${GCC_TARGET}\" -c ${.IMPSRC} .include <bsd.lib.mk> diff --git a/gnu/usr.bin/cc/f77/Makefile b/gnu/usr.bin/cc/f77/Makefile index 3b76bc5..9160391 100644 --- a/gnu/usr.bin/cc/f77/Makefile +++ b/gnu/usr.bin/cc/f77/Makefile @@ -8,8 +8,6 @@ PROG= f77 SRCS= gcc.c g77spec.c -CFLAGS+= -DDEFAULT_TARGET_VERSION=\"$(version)\" -CFLAGS+= -DDEFAULT_TARGET_MACHINE=\"$(target)\" CFLAGS+= -DFORTRAN_INIT=\"-lg2c\" -DFORTRAN_INIT_PROFILE=\"-lg2c_p\" DPADD= ${LIBCC_INT} |