PERFORCE change 128034 for review
Peter Wemm
peter at FreeBSD.org
Wed Oct 24 15:21:28 PDT 2007
http://perforce.freebsd.org/chv.cgi?CH=128034
Change 128034 by peter at peter_daintree on 2007/10/24 22:21:05
Evil nasty despicable (but low impact) hack to make gcc -m32 work.
Affected files ...
.. //depot/projects/hammer/contrib/gcc/gcc.c#12 edit
.. //depot/projects/hammer/gnu/usr.bin/cc/cc_tools/freebsd-native.h#10 edit
Differences ...
==== //depot/projects/hammer/contrib/gcc/gcc.c#12 (text+ko) ====
@@ -780,12 +780,16 @@
static const char *trad_capable_cpp =
"cc1 -E %{traditional|ftraditional|traditional-cpp:-traditional-cpp}";
+#ifndef INCLUDE32
+#define INCLUDE32 " "
+#endif
+
/* We don't wrap .d files in %W{} since a missing .d file, and
therefore no dependency entry, confuses make into thinking a .o
file that happens to exist is up-to-date. */
static const char *cpp_unique_options =
"%{C|CC:%{!E:%eGCC does not support -C or -CC without -E}}\
- %{!Q:-quiet} %{nostdinc*} %{C} %{CC} %{v} %{I*&F*} %{P} %I\
+ %{!Q:-quiet} %{nostdinc*} %{C} %{CC} %{v}"INCLUDE32"%{I*&F*} %{P} %I\
%{MD:-MD %{!o:%b.d}%{o*:%.d%*}}\
%{MMD:-MMD %{!o:%b.d}%{o*:%.d%*}}\
%{M} %{MM} %{MF*} %{MG} %{MP} %{MQ*} %{MT*}\
==== //depot/projects/hammer/gnu/usr.bin/cc/cc_tools/freebsd-native.h#10 (text+ko) ====
@@ -23,6 +23,9 @@
#else
#define STANDARD_INCLUDE_DIR PREFIX"/include"
#endif
+#ifdef __amd64__
+#define INCLUDE32 " %{m32:-I"PREFIX"/include32} "
+#endif
/* Under FreeBSD, the normal location of the compiler back ends is the
/usr/libexec directory.
@@ -44,7 +47,11 @@
#undef MD_STARTFILE_PREFIX /* We don't need one for now. */
#define STANDARD_STARTFILE_PREFIX PREFIX"/lib/"
+#ifdef __amd64__
+#define STARTFILE_PREFIX_SPEC "%{m32:"PREFIX"/lib32/} %{!m32:"PREFIX"/lib/}"
+#else
#define STARTFILE_PREFIX_SPEC PREFIX"/lib/"
+#endif
#if 0
#define LIBGCC_SPEC "%{shared: -lgcc_pic} \
More information about the p4-projects
mailing list