Author: dcoakley
Date: 2011-06-10 18:08:19 -0400 (Fri, 10 Jun 2011)
New Revision: 3644

Modified:
   trunk/Makefile.in
   trunk/configure
   trunk/configure.ac
   trunk/osprey/Makefile.gsetup.in
   trunk/osprey/driver/Makefile.gbase
   trunk/osprey/driver/objects.c
   trunk/osprey/driver/phases.c
Log:
Add experimental configure option to disable IPA support.

This option is useful for leaving out some of the less portable parts
of the compiler build.  Known portability problems specific to the IPA
support include:

o ELF objects are used as the container for the intermediate WHIRL.

o ipa_link uses dlopen and dlsym to directly call functions in ipa.so.

o IPA compilation assumes the presence of a POSIX make and shell.

Changes in this revision:

o Define make variable BUILD_SKIP_IPA when configured with --disable-ipa.
  In the top-level build, skip components that are specific to IPA when
  the variable is set to YES.

o In the driver, print a friendly error message if IPA compilation is
  attempted and BUILD_SKIP_IPA is defined.  Also leave out code related to
  IPA ELF objects (previously skipped when TARG_NVISA was defined).

Approved by: Mike Murphy


Modified: trunk/Makefile.in
===================================================================
--- trunk/Makefile.in   2011-06-10 16:59:05 UTC (rev 3643)
+++ trunk/Makefile.in   2011-06-10 22:08:19 UTC (rev 3644)
@@ -1,6 +1,6 @@
 #
 #
-#  Copyright (C) 2009-2010 Advanced Micro Devices, Inc.  All Rights Reserved.
+#  Copyright (C) 2009-2011 Advanced Micro Devices, Inc.  All Rights Reserved.
 #
 #  Copyright (C) 2000, 2001 Silicon Graphics, Inc.  All Rights Reserved.
 #
@@ -68,6 +68,7 @@
 BUILD_MULTILIB      = @BUILD_MULTILIB@
 BUILD_GNU3          = @BUILD_GNU3@
 BUILD_FORTRAN       = @BUILD_FORTRAN@
+BUILD_SKIP_IPA      = @BUILD_SKIP_IPA@
 
 ifeq ($(MACHINE_TYPE), ia64)
 # ia64
@@ -97,14 +98,18 @@
                 $(NATIVE_BUILD_DIR)/wopt/wopt.so \
                 $(NATIVE_BUILD_DIR)/lno/lno.so \
                 $(NATIVE_BUILD_DIR)/lw_inline/inline \
-                $(NATIVE_BUILD_DIR)/ipa/ipa.so \
-                $(NATIVE_BUILD_DIR)/ipl/ipl.so \
-                $(NATIVE_BUILD_DIR)/ipl/ipl \
                 $(NATIVE_BUILD_DIR)/whirl2c/whirl2c.so \
                 $(NATIVE_BUILD_DIR)/whirl2c/whirl2c \
-                $(NATIVE_BUILD_DIR)/ir_tools/ir_b2a \
-                $(NATIVE_BUILD_DIR_LD)/ld/ld-new 
+                $(NATIVE_BUILD_DIR)/ir_tools/ir_b2a
 
+ifneq ($(BUILD_SKIP_IPA), YES)
+BASIC_COMPONENTS += \
+               $(NATIVE_BUILD_DIR)/ipa/ipa.so \
+               $(NATIVE_BUILD_DIR)/ipl/ipl.so \
+               $(NATIVE_BUILD_DIR)/ipl/ipl \
+               $(NATIVE_BUILD_DIR_LD)/ld/ld-new 
+endif
+
 ifeq ($(BUILD_FORTRAN), YES)
 BASIC_COMPONENTS += \
                $(NATIVE_BUILD_DIR)/whirl2f/whirl2f.so \

Modified: trunk/configure
===================================================================
--- trunk/configure     2011-06-10 16:59:05 UTC (rev 3643)
+++ trunk/configure     2011-06-10 22:08:19 UTC (rev 3644)
@@ -273,7 +273,7 @@
 
 ac_subdirs_all="$ac_subdirs_all osprey/cygnus"
 ac_subdirs_all="$ac_subdirs_all osprey-gcc-4.2.0"
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME 
PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix 
program_transform_name bindir sbindir libexecdir datadir sysconfdir 
sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir 
build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build 
build_cpu build_vendor build_os host host_cpu host_vendor host_os target 
target_cpu target_vendor target_os MACHINE_TYPE BUILD_ABI BUILD_ARCH BUILD_HOST 
BUILD_TARGET BUILD_VENDOR BUILD_OPTIMIZE BUILD_LIB_OPTIMIZE BUILD_COMPILER 
BUILD_BOTH LIB_MACHINE_TYPE LIB_BUILD_TARGET LIB_BUILD_ABI LIB_BUILD_ARCH 
LIB_BUILD_HOST LIB2_MACHINE_TYPE LIB2_BUILD_TARGET LIB2_BUILD_ABI 
LIB2_BUILD_ARCH LIB2_BUILD_HOST BUILD_MULTILIB COMPILER_TARG_DIR TARG_INFO_NAME 
BUILD_GNU3 BUILD_FORTRAN GCC_CONFIGURE_TARG GCC_DIR LIBLIST subdirs LIBOBJS 
LTLIBOBJS'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME 
PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix 
program_transform_name bindir sbindir libexecdir datadir sysconfdir 
sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir 
build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build 
build_cpu build_vendor build_os host host_cpu host_vendor host_os target 
target_cpu target_vendor target_os MACHINE_TYPE BUILD_ABI BUILD_ARCH BUILD_HOST 
BUILD_TARGET BUILD_VENDOR BUILD_OPTIMIZE BUILD_LIB_OPTIMIZE BUILD_COMPILER 
BUILD_BOTH LIB_MACHINE_TYPE LIB_BUILD_TARGET LIB_BUILD_ABI LIB_BUILD_ARCH 
LIB_BUILD_HOST LIB2_MACHINE_TYPE LIB2_BUILD_TARGET LIB2_BUILD_ABI 
LIB2_BUILD_ARCH LIB2_BUILD_HOST BUILD_MULTILIB COMPILER_TARG_DIR TARG_INFO_NAME 
BUILD_GNU3 BUILD_FORTRAN BUILD_SKIP_IPA GCC_CONFIGURE_TARG GCC_DIR LIBLIST 
subdirs LIBOBJS LTLIBOBJS'
 ac_subst_files=''
 
 # Initialize some variables set by options.
@@ -793,6 +793,7 @@
   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
   --enable-gnu3           Enable GNU3-based C/C++ frontend
   --disable-fortran       Disable Fortran language support
+  --disable-ipa           Disable IPA compilation support (EXPERIMENTAL)
 
 Optional Packages:
   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
@@ -1482,6 +1483,20 @@
 fi
 
 
+# Set whether to skip IPA support (default NO).
+# Check whether --enable-ipa or --disable-ipa was given.
+if test "${enable_ipa+set}" = set; then
+  enableval="$enable_ipa"
+
+fi;
+
+if test "x$enable_ipa" = "xno"; then
+
+  BUILD_SKIP_IPA=YES
+
+fi
+
+
 # Specify the targ_info directory under osprey/common to use.  IA64 uses
 # ipfec_targ_info instead of targ_info.
 TARG_INFO_NAME=targ_info
@@ -1683,6 +1698,7 @@
 
 
 
+
 # List of configurable files to create in object directory.
                                                                                
                                                                                
                                                                                
                                                   
ac_config_files="$ac_config_files Makefile osprey/Makefile.gsetup 
osprey/targdir/libspin/Makefile osprey/targdir/libspin_4_2_0/Makefile 
osprey/targdir/include/Makefile osprey/targdir/driver/Makefile 
osprey/targdir/libiberty/Makefile osprey/targdir/targ_info/Makefile 
osprey/targdir/be/Makefile osprey/targdir/libelf/Makefile 
osprey/targdir/libelfutil/Makefile osprey/targdir/libdwarf/Makefile 
osprey/targdir/libunwindP/Makefile osprey/targdir/cg/Makefile 
osprey/targdir/wopt/Makefile osprey/targdir/ipl/Makefile 
osprey/targdir/lno/Makefile osprey/targdir/lw_inline/Makefile 
osprey/targdir/ipa/Makefile osprey/targdir/whirl2c/Makefile 
osprey/targdir/libcomutil/Makefile osprey/targdir/ir_tools/Makefile 
osprey/targdir/libcmplrs/Makefile osprey/targdir/wgen/Makefile 
osprey/targdir/libcif/Makefile osprey/targdir/arith/Makefile 
osprey/targdir/orc_ict/Makefile osprey/targdir/orc_intel/Makefile 
osprey/targdir/libkapi/Makefile"
 
@@ -2495,6 +2511,7 @@
 s,@TARG_INFO_NAME@,$TARG_INFO_NAME,;t t
 s,@BUILD_GNU3@,$BUILD_GNU3,;t t
 s,@BUILD_FORTRAN@,$BUILD_FORTRAN,;t t
+s,@BUILD_SKIP_IPA@,$BUILD_SKIP_IPA,;t t
 s,@GCC_CONFIGURE_TARG@,$GCC_CONFIGURE_TARG,;t t
 s,@GCC_DIR@,$GCC_DIR,;t t
 s,@LIBLIST@,$LIBLIST,;t t

Modified: trunk/configure.ac
===================================================================
--- trunk/configure.ac  2011-06-10 16:59:05 UTC (rev 3643)
+++ trunk/configure.ac  2011-06-10 22:08:19 UTC (rev 3644)
@@ -135,6 +135,14 @@
   BUILD_FORTRAN=YES
 ])
 
+# Set whether to skip IPA support (default NO).
+AC_ARG_ENABLE([ipa],
+  AS_HELP_STRING([--disable-ipa], [Disable IPA compilation support 
(EXPERIMENTAL)]))
+
+AS_IF([test "x$enable_ipa" = "xno"], [
+  BUILD_SKIP_IPA=YES
+])
+
 # Specify the targ_info directory under osprey/common to use.  IA64 uses
 # ipfec_targ_info instead of targ_info.
 TARG_INFO_NAME=targ_info
@@ -329,6 +337,7 @@
 AC_SUBST([TARG_INFO_NAME])
 AC_SUBST([BUILD_GNU3])
 AC_SUBST([BUILD_FORTRAN])
+AC_SUBST([BUILD_SKIP_IPA])
 AC_SUBST([GCC_CONFIGURE_TARG])
 AC_SUBST([GCC_DIR])
 

Modified: trunk/osprey/Makefile.gsetup.in
===================================================================
--- trunk/osprey/Makefile.gsetup.in     2011-06-10 16:59:05 UTC (rev 3643)
+++ trunk/osprey/Makefile.gsetup.in     2011-06-10 22:08:19 UTC (rev 3644)
@@ -1,8 +1,11 @@
 # -*- Makefile -*-
 #
-#  Copyright (C) 2000, 2001 Silicon Graphics, Inc.  All Rights Reserved.
+#  Copyright (C) 2011 Advanced Micro Devices, Inc.  All Rights Reserved.
+#
 #  Copyright (C) 2010 Hewlett Packard Company
 #
+#  Copyright (C) 2000, 2001 Silicon Graphics, Inc.  All Rights Reserved.
+#
 #  This program is free software; you can redistribute it and/or modify it
 #  under the terms of version 2 of the GNU General Public License as
 #  published by the Free Software Foundation.
@@ -138,6 +141,9 @@
 ifndef BUILD_GNU3
      BUILD_GNU3     = @BUILD_GNU3@
 endif
+ifndef BUILD_SKIP_IPA
+     BUILD_SKIP_IPA = @BUILD_SKIP_IPA@
+endif
 ifndef COMPILER_TARG_DIR
      COMPILER_TARG_DIR = @abs_top_builddir@/osprey/targdir
 endif

Modified: trunk/osprey/driver/Makefile.gbase
===================================================================
--- trunk/osprey/driver/Makefile.gbase  2011-06-10 16:59:05 UTC (rev 3643)
+++ trunk/osprey/driver/Makefile.gbase  2011-06-10 22:08:19 UTC (rev 3644)
@@ -1,5 +1,7 @@
 # -*- Makefile -*-
 #
+#  Copyright (C) 2011 Advanced Micro Devices, Inc.  All Rights Reserved.
+#
 #  Copyright (C) 2000, 2001 Silicon Graphics, Inc.  All Rights Reserved.
 #
 #  This program is free software; you can redistribute it and/or modify it
@@ -73,6 +75,10 @@
 LCDEFS += -DBUILD_GNU3
 endif
 
+ifeq ($(BUILD_SKIP_IPA), YES)
+LCDEFS += -DBUILD_SKIP_IPA
+endif
+
 LCDEFS += -DOPEN64_PRODNAME='"Compiler"'
 
 LCDEFS += -DKEY 

Modified: trunk/osprey/driver/objects.c
===================================================================
--- trunk/osprey/driver/objects.c       2011-06-10 16:59:05 UTC (rev 3643)
+++ trunk/osprey/driver/objects.c       2011-06-10 22:08:19 UTC (rev 3644)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2009 Advanced Micro Devices, Inc.  All Rights Reserved.
+ * Copyright (C) 2009, 2011 Advanced Micro Devices, Inc.  All Rights Reserved.
  */
 
 /*
@@ -707,7 +707,7 @@
 }
 
 
-#if defined(TARG_NVISA)
+#ifdef BUILD_SKIP_IPA
 // ignore ipa elf issues
 static int check_for_whirl (char *name) { return FALSE; }
 #else
@@ -784,4 +784,4 @@
     return FALSE;
     
 }
-#endif //TARG_NVISA
+#endif // BUILD_SKIP_IPA

Modified: trunk/osprey/driver/phases.c
===================================================================
--- trunk/osprey/driver/phases.c        2011-06-10 16:59:05 UTC (rev 3643)
+++ trunk/osprey/driver/phases.c        2011-06-10 22:08:19 UTC (rev 3644)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2008-2010 Advanced Micro Devices, Inc.  All Rights Reserved.
+ * Copyright (C) 2008-2011 Advanced Micro Devices, Inc.  All Rights Reserved.
  */
 
 /*
@@ -3121,6 +3121,14 @@
            add_string(args, "-m elf_x86_64");
        }
 #endif
+
+#ifdef BUILD_SKIP_IPA
+        if (ipa == TRUE) {
+            error("IPA support is not enabled in this compiler.");
+            return;
+        }
+#endif
+
        if (ipa == TRUE) {
            char *str;
            ldpath = get_phase_dir (ldphase);


------------------------------------------------------------------------------
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
_______________________________________________
Open64-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/open64-devel

Reply via email to