I am still looking for a reviewer for this patch. Mike or Jian-Xin,
could one of you take a look? Thanks.
On Thu, May 26, 2011 at 5:16 PM, David Coakley <dcoak...@gmail.com> wrote:
> Could a gatekeeper please review the attached patch to the driver and
> the build system?
>
> Motivation: some of the more difficult portability problems in Open64
> are in the IPA support (see below). While we work on improving
> portability, this patch lets us make progress on other areas without
> getting blocked by IPA. This mode is not intended to be a recommended
> way of building the compiler, only a short-term vehicle to make
> progress faster. Here is the proposed commit message:
>
> 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 patch:
>
> 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).
>
>
> Note: the build system has not been updated for NVISA target support.
> If it ever is, it should be obvious that IPA will need to be skipped
> by setting the configure variable. I hope we all agree that checking
> for the feature support in the code is preferable to checking the
> target architecture. Thanks,
>
> -David Coakley / AMD Open Source Compiler Engineering
>
Index: osprey/driver/phases.c
===================================================================
--- osprey/driver/phases.c (revision 3629)
+++ osprey/driver/phases.c (working copy)
@@ -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);
Index: osprey/driver/objects.c
===================================================================
--- osprey/driver/objects.c (revision 3629)
+++ osprey/driver/objects.c (working copy)
@@ -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
Index: osprey/driver/Makefile.gbase
===================================================================
--- osprey/driver/Makefile.gbase (revision 3629)
+++ osprey/driver/Makefile.gbase (working copy)
@@ -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
Index: osprey/Makefile.gsetup.in
===================================================================
--- osprey/Makefile.gsetup.in (revision 3629)
+++ osprey/Makefile.gsetup.in (working copy)
@@ -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
Index: Makefile.in
===================================================================
--- Makefile.in (revision 3629)
+++ Makefile.in (working copy)
@@ -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 \
Index: configure.ac
===================================================================
--- configure.ac (revision 3629)
+++ configure.ac (working copy)
@@ -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])
------------------------------------------------------------------------------
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
Open64-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/open64-devel