Author: luohuan Date: 2012-10-09 03:45:28 -0400 (Tue, 09 Oct 2012) New Revision: 4035
Modified: trunk/Makefile.in trunk/configure trunk/configure.ac trunk/install_compiler.sh trunk/osprey-gcc-4.2.0/gcc/c-tree.h Log: Configure-based build system for PPC native compiler. Reviewed by David Coakley Modified: trunk/Makefile.in =================================================================== --- trunk/Makefile.in 2012-10-04 21:05:24 UTC (rev 4034) +++ trunk/Makefile.in 2012-10-09 07:45:28 UTC (rev 4035) @@ -152,8 +152,7 @@ $(NATIVE_BUILD_DIR)/libelfutil \ $(NATIVE_BUILD_DIR)/libdwarf \ $(NATIVE_BUILD_DIR)/libunwindP \ - $(NATIVE_BUILD_DIR)/libcif \ - $(NATIVE_BUILD_DIR)/arith + $(NATIVE_BUILD_DIR)/libcif NATIVE_COMPONENTS = $(BASIC_COMPONENTS) $(TARGET_EXTRA_OBJ) \ $(GNU4_FE_COMPONENTS) $(FORT_FE_COMPONENTS) \ @@ -455,8 +454,8 @@ ifeq ($(BUILD_FORTRAN), YES) $(MAKE) -C $(NATIVE_BUILD_DIR)/crayf90 clobber $(MAKE) -C $(NATIVE_BUILD_DIR)/whirl2f clobber -endif $(MAKE) -C $(NATIVE_BUILD_DIR)/arith clobber +endif $(MAKE) -C $(NATIVE_BUILD_DIR)/include clobber $(MAKE) -C $(NATIVE_BUILD_DIR)/libspin_4_2_0 clobber ifeq ($(MACHINE_TYPE), ia64) Modified: trunk/configure =================================================================== --- trunk/configure 2012-10-04 21:05:24 UTC (rev 4034) +++ trunk/configure 2012-10-09 07:45:28 UTC (rev 4035) @@ -1597,6 +1597,8 @@ CYGNUS_CONFIGURE_HOST=ia64-linux-gnu GCC_CONFIGURE_HOST=ia64-redhat-linux ;; + powerpc-*-linux*) + ;; *) { { echo "$as_me:$LINENO: error: \"open64 is not supported on $target\"" >&5 echo "$as_me: error: \"open64 is not supported on $target\"" >&2;} @@ -1649,10 +1651,7 @@ ;; powerpc-*-linux*) MACHINE_TYPE=PPC32 - CROSS_TARGET="$target" BUILD_ABI=I32BIT - BUILD_ARCH=IA32 - BUILD_HOST=IA32 BUILD_TARGET=PPC32 BUILD_MULTILIB=NO BUILD_VENDOR=OSP @@ -1660,9 +1659,22 @@ GCC_CONFIGURE_HOST=powerpc-redhat-linux GCC_CONFIGURE_BUILD=powerpc-redhat-linux CYGNUS_CONFIGURE_TARG=mipsel-elf-linux + GCC_CONFIGURE_COMPILER+=" -m32" GCC_CONFIGURE_CFLAGS+=" -DTARG_PPC32" - GCC_CONFIGURE_COMPILER+=" -m32" - ;; + case "$host" in + powerpc-*-linux*) + BUILD_ARCH=PPC32 + BUILD_HOST=PPC32 + BUILD_SKIP_IPA=YES + GCC_CONFIGURE_CFLAGS+=" -DTARG_PPC" + ;; + *) + BUILD_SKIP_IPA=NO + BUILD_ARCH=IA32 + BUILD_HOST=IA32 + CROSS_TARGET="$target" + ;; + esac ;; sl*-*-linux*) MACHINE_TYPE=SL BUILD_TARGET=SL @@ -1692,7 +1704,6 @@ if test "${BUILD_TARGET}" = "PPC32"; then BUILD_GNU3="NO" BUILD_FORTRAN="NO" - BUILD_SKIP_IPA="NO" fi UNAME_MACHINE=`uname -m` Modified: trunk/configure.ac =================================================================== --- trunk/configure.ac 2012-10-04 21:05:24 UTC (rev 4034) +++ trunk/configure.ac 2012-10-09 07:45:28 UTC (rev 4035) @@ -224,6 +224,8 @@ CYGNUS_CONFIGURE_HOST=ia64-linux-gnu GCC_CONFIGURE_HOST=ia64-redhat-linux ;; + powerpc-*-linux*) + ;; *) AC_MSG_ERROR(["open64 is not supported on $target"]) ;; @@ -274,10 +276,7 @@ ;; powerpc-*-linux*) MACHINE_TYPE=PPC32 - CROSS_TARGET="$target" BUILD_ABI=I32BIT - BUILD_ARCH=IA32 - BUILD_HOST=IA32 BUILD_TARGET=PPC32 BUILD_MULTILIB=NO BUILD_VENDOR=OSP @@ -285,9 +284,22 @@ GCC_CONFIGURE_HOST=powerpc-redhat-linux GCC_CONFIGURE_BUILD=powerpc-redhat-linux CYGNUS_CONFIGURE_TARG=mipsel-elf-linux + GCC_CONFIGURE_COMPILER+=" -m32" GCC_CONFIGURE_CFLAGS+=" -DTARG_PPC32" - GCC_CONFIGURE_COMPILER+=" -m32" - ;; + case "$host" in + powerpc-*-linux*) + BUILD_ARCH=PPC32 + BUILD_HOST=PPC32 + BUILD_SKIP_IPA=YES + GCC_CONFIGURE_CFLAGS+=" -DTARG_PPC" + ;; + *) + BUILD_SKIP_IPA=NO + BUILD_ARCH=IA32 + BUILD_HOST=IA32 + CROSS_TARGET="$target" + ;; + esac ;; sl*-*-linux*) MACHINE_TYPE=SL BUILD_TARGET=SL @@ -315,7 +327,6 @@ if test "${BUILD_TARGET}" = "PPC32"; then BUILD_GNU3="NO" BUILD_FORTRAN="NO" - BUILD_SKIP_IPA="NO" fi UNAME_MACHINE=`uname -m` Modified: trunk/install_compiler.sh =================================================================== --- trunk/install_compiler.sh 2012-10-04 21:05:24 UTC (rev 4034) +++ trunk/install_compiler.sh 2012-10-09 07:45:28 UTC (rev 4035) @@ -58,6 +58,9 @@ if [ -z "$3" ]; then CROSS_TARGET="" + if [ $1 = "PPC32" ]; then + ARCH="ppc" + fi else CROSS_TARGET=$3 fi @@ -91,6 +94,7 @@ ppc ) BUILD_HOST="ppc32" TARG_HOST="ppc32" + INSTALL_FORTRAN="NO" AREA="osprey/targppc32_ppc32" PHASE_DIR_PREFIX="ppc32" PREBUILD_INTERPOS="ppc32-linux" @@ -197,7 +201,6 @@ if [ "$ARCH" = "PPC32" ]; then INSTALL_EXEC_SUB ${AREA}/driver/driver ${BIN_DIR}/powercc INSTALL_EXEC_SUB ${AREA}/driver/driver ${BIN_DIR}/powercc-${VERSION} - ln -sf ${BIN_DIR}/powercc ${BIN_DIR}/${CROSS_TARGET}-opencc else INSTALL_EXEC_SUB ${AREA}/driver/driver ${BIN_DIR}/opencc INSTALL_EXEC_SUB ${AREA}/driver/driver ${BIN_DIR}/openCC @@ -274,7 +277,7 @@ # GNU 4.2.0 based FE INSTALL_EXEC_SUB ${AREA}/wgen/wgen42 ${PHASEPATH}/wgen42 - if [ "$ARCH" = "PPC32" ]; then + if [ "$TARG_HOST" = "ppc32" ]; then LIBEXEC=libexec/gcc/powerpc-redhat-linux/4.2.0 else LIBEXEC=libexec/gcc/${PHASE_DIR_PREFIX}-redhat-linux/4.2.0 Modified: trunk/osprey-gcc-4.2.0/gcc/c-tree.h =================================================================== --- trunk/osprey-gcc-4.2.0/gcc/c-tree.h 2012-10-04 21:05:24 UTC (rev 4034) +++ trunk/osprey-gcc-4.2.0/gcc/c-tree.h 2012-10-09 07:45:28 UTC (rev 4035) @@ -34,7 +34,7 @@ know how big it is. This is sanity-checked in c-decl.c. */ /* Bug 12755: On mips native, there is a extra four bytes (of alignment * padding?) somewhere */ -#ifdef ARCH_MIPS || defined(ARCH_PPC) +#if defined(ARCH_MIPS) || defined(TARG_PPC) #define C_SIZEOF_STRUCT_LANG_IDENTIFIER \ (sizeof (struct c_common_identifier) + 3 * sizeof (void *) + 4) #else ------------------------------------------------------------------------------ Don't let slow site performance ruin your business. Deploy New Relic APM Deploy New Relic app performance management and know exactly what is happening inside your Ruby, Python, PHP, Java, and .NET app Try New Relic at no cost today and get our sweet Data Nerd shirt too! http://p.sf.net/sfu/newrelic-dev2dev _______________________________________________ Open64-devel mailing list Open64-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/open64-devel