From owner-p4-projects@FreeBSD.ORG Sun Feb 22 18:12:21 2009 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id D60C31065675; Sun, 22 Feb 2009 18:12:20 +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 950EE106566B for ; Sun, 22 Feb 2009 18:12:20 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 680928FC17 for ; Sun, 22 Feb 2009 18:12:20 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id n1MICKBu074378 for ; Sun, 22 Feb 2009 18:12:20 GMT (envelope-from nwhitehorn@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id n1MICKj0074376 for perforce@freebsd.org; Sun, 22 Feb 2009 18:12:20 GMT (envelope-from nwhitehorn@freebsd.org) Date: Sun, 22 Feb 2009 18:12:20 GMT Message-Id: <200902221812.n1MICKj0074376@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to nwhitehorn@freebsd.org using -f From: Nathan Whitehorn To: Perforce Change Reviews Cc: Subject: PERFORCE change 158078 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: Sun, 22 Feb 2009 18:12:21 -0000 http://perforce.freebsd.org/chv.cgi?CH=158078 Change 158078 by nwhitehorn@nwhitehorn_trantor on 2009/02/22 18:11:21 A few more compiler nits: make -m32 almost work. It still does not pass the appropriate -a{32,64} to the assembler because of the stupid way GCC chooses how to do this, but the compiler at least is doing the right thing. Affected files ... .. //depot/projects/ppc-g5/contrib/gcc/config/rs6000/freebsd.h#5 edit .. //depot/projects/ppc-g5/gnu/usr.bin/binutils/libbfd/Makefile.ppc64#2 edit Differences ... ==== //depot/projects/ppc-g5/contrib/gcc/config/rs6000/freebsd.h#5 (text+ko) ==== @@ -21,10 +21,6 @@ /* Override the defaults, which exist to force the proper definition. */ -#undef TARGET_64BIT -#define TARGET_64BIT (TARGET_CPU_DEFAULT != NULL && strcmp(TARGET_CPU_DEFAULT, \ - "powerpc64") == 0) - #ifdef IN_LIBGCC2 #undef TARGET_64BIT #ifdef __ppc64__ @@ -41,17 +37,14 @@ #undef TARGET_AIX #define TARGET_AIX TARGET_64BIT -#undef CPP_OS_DEFAULT_SPEC -#define CPP_OS_DEFAULT_SPEC "%(cpp_os_freebsd)" - -#undef CPP_OS_FREEBSD_SPEC -#define CPP_OS_FREEBSD_SPEC "\ - -D__PPC__ -D__ppc__ -D__PowerPC__ -D__powerpc__" - #undef FBSD_TARGET_CPU_CPP_BUILTINS #define FBSD_TARGET_CPU_CPP_BUILTINS() \ do \ { \ + builtin_define ("__PPC__"); \ + builtin_define ("__ppc__"); \ + builtin_define ("__PowerPC__"); \ + builtin_define ("__powerpc__"); \ if (TARGET_64BIT) \ { \ builtin_define ("__LP64__"); \ @@ -102,7 +95,7 @@ if ((target_flags & MASK_POWERPC64) == 0) \ { \ target_flags |= MASK_POWERPC64; \ - error ("32-bit PowerPC unavailable on ppc64"); \ + error ("64 bit CPU required"); \ } \ } \ } \ @@ -124,9 +117,6 @@ #undef LINK_OS_DEFAULT_SPEC #define LINK_OS_DEFAULT_SPEC "%(link_os_freebsd)" -#undef ASM_DEFAULT_SPEC -#define ASM_DEFAULT_SPEC (TARGET_64BIT ? "-mppc64" : "-mppc") - /* XXX: This is wrong for many platforms in sysv4.h. We should work on getting that definition fixed. */ #undef LINK_SHLIB_SPEC @@ -142,6 +132,9 @@ #undef SIZE_TYPE #define SIZE_TYPE (TARGET_64BIT ? "long unsigned int" : "unsigned int") +#undef PTRDIFF_TYPE +#define PTRDIFF_TYPE (TARGET_64BIT ? "long int" : "int") + /* rs6000.h gets this wrong for FreeBSD. We use the GCC defaults instead. */ #undef WCHAR_TYPE ==== //depot/projects/ppc-g5/gnu/usr.bin/binutils/libbfd/Makefile.ppc64#2 (text+ko) ==== @@ -6,6 +6,11 @@ SRCS+= cpu-powerpc.c \ cpu-rs6000.c \ + elf32.c \ + elf32-gen.c \ + elf32-ppc.c \ + elf32-target.h \ + elflink.c \ elf64.c \ elf64-gen.c \ elf64-ppc.c \ @@ -16,4 +21,5 @@ VECS+= ${DEFAULT_VECTOR} \ bfd_elf64_powerpcle_vec \ - ppcboot_vec + bfd_elf32_powerpc_vec \ + bfd_elf32_powerpcle_vec