From owner-p4-projects@FreeBSD.ORG Wed Oct 24 22:21:28 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id C4F2616A46C; Wed, 24 Oct 2007 22:21:27 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 686B216A468 for ; Wed, 24 Oct 2007 22:21:27 +0000 (UTC) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 56D5D13C465 for ; Wed, 24 Oct 2007 22:21:27 +0000 (UTC) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l9OMLRO1089711 for ; Wed, 24 Oct 2007 22:21:27 GMT (envelope-from peter@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l9OMLRm4089708 for perforce@freebsd.org; Wed, 24 Oct 2007 22:21:27 GMT (envelope-from peter@freebsd.org) Date: Wed, 24 Oct 2007 22:21:27 GMT Message-Id: <200710242221.l9OMLRm4089708@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to peter@freebsd.org using -f From: Peter Wemm To: Perforce Change Reviews Cc: Subject: PERFORCE change 128034 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Oct 2007 22:21:28 -0000 http://perforce.freebsd.org/chv.cgi?CH=128034 Change 128034 by peter@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} \