[llvm-commits] [129252] Enable llvm-gcc to build when LLVM is configured with --enable-expensive-checks .
Bill Wendling
isanbard at gmail.com
Tue Jul 10 04:16:29 PDT 2007
I think that this commit is breaking the build. Here's the error I get:
stage1/xgcc -Bstage1/ -B/usr/local/llvm-gcc-install/powerpc-apple-
darwin9/bin/ -c -g -O2 -mdynamic-no-pic -DIN_GCC -W -Wall -Wwrite-
strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-
long -Wno-variadic-macros -Wold-style-definition -Werror -
DHAVE_CONFIG_H -DGENERATOR_FILE -DENABLE_LLVM -D__STDC_LIMIT_MACROS -
I/Volumes/SandBox/Clean/llvm-1040-02.roots/llvm-1040-02~obj/src/llvm/
include -D_DEBUG -D_GNU_SOURCE -D__STDC_LIMIT_MACROS -I. -Ibuild -
I/Volumes/SandBox/Clean/llvm-1040-02.roots/llvm-1040-02~obj/src/gcc -
I/Volumes/SandBox/Clean/llvm-1040-02.roots/llvm-1040-02~obj/src/gcc/
build -I/Volumes/SandBox/Clean/llvm-1040-02.roots/llvm-1040-02~obj/
src/gcc/../include -I./../intl -I/Volumes/SandBox/Clean/
llvm-1040-02.roots/llvm-1040-02~obj/src/gcc/../libcpp/include -I/
Volumes/SandBox/Clean/llvm-1040-02.roots/llvm-1040-02~obj/src/llvm/
include -I/Volumes/SandBox/Clean/llvm-1040-02.roots/llvm-1040-02~obj/
obj-llvm/include \
-o build/errors.o /Volumes/SandBox/Clean/llvm-1040-02.roots/
llvm-1040-02~obj/src/gcc/errors.c
<command line>:1:1: error: "__STDC_LIMIT_MACROS" redefined
<command line>:1:1: error: this is the location of the previous
definition
<command line>:1:1: error: "__STDC_LIMIT_MACROS" redefined
<command line>:1:1: error: this is the location of the previous
definition
make[3]: *** [build/errors.o] Error 1
make[3]: *** Waiting for unfinished jobs....
make[3]: *** [build/genmodes.o] Error 1
make[2]: *** [stage2_build] Error 2
make[1]: *** [bootstrap] Error 2
+ exit 1
make: *** [install] Error 1
-bw
On Jul 9, 2007, at 10:56 AM, clattner at apple.com wrote:
> Revision: 129252
> Author: clattner
> Date: 2007-07-09 10:56:42 -0700 (Mon, 09 Jul 2007)
>
> Log Message:
> -----------
> Enable llvm-gcc to build when LLVM is configured with --enable-
> expensive-checks.
>
> Patch by David Greene!
>
> Modified Paths:
> --------------
> apple-local/branches/llvm/gcc/Makefile.in
> apple-local/branches/llvm/gcc/configure
> apple-local/branches/llvm/gcc/configure.ac
> apple-local/branches/llvm/libcpp/configure
> apple-local/branches/llvm/libcpp/configure.ac
>
> Modified: apple-local/branches/llvm/gcc/Makefile.in
> ===================================================================
> --- apple-local/branches/llvm/gcc/Makefile.in 2007-07-09 02:28:29
> UTC (rev 129251)
> +++ apple-local/branches/llvm/gcc/Makefile.in 2007-07-09 17:56:42
> UTC (rev 129252)
> @@ -217,26 +217,21 @@
> # APPLE LOCAL begin LLVM
> @checkingenabled_flag@
> LLVMOBJDIR = @LLVMBASEPATH@
> -ifeq ($(LLVMOBJDIR),)
> -CPPFLAGS = @CPPFLAGS@
> -else
> -CPPFLAGS = @CPPFLAGS@ -DENABLE_LLVM -D__STDC_LIMIT_MACROS
>
> ifdef LLVM_VERSION_INFO
> CPPFLAGS += -DLLVM_VERSION_INFO='"$(LLVM_VERSION_INFO)"'
> endif
>
> -ifdef CHECKING_ENABLED
> -BUILDMODE=Debug
> -else
> -ifdef DISABLE_LLVMASSERTIONS
> -BUILDMODE=Release-Asserts
> -else
> -BUILDMODE=Release
> -endif
> -endif
> +# Determine BUILDMODE from configure run (--enable-llvm)
> +BUILDMODE := @LLVMBUILDMODE@
> +
> LLVMBINPATH = $(LLVMOBJDIR)/$(BUILDMODE)/bin
>
> +ifeq ($(LLVMOBJDIR),)
> +CPPFLAGS = @CPPFLAGS@
> +else
> +CPPFLAGS := @CPPFLAGS@ -DENABLE_LLVM -D__STDC_LIMIT_MACROS $(shell
> $(LLVMBINPATH)/llvm-config --cppflags)
> +
> # Use llvm-config to get the srcdir that LLVM was configured with,
> to support
> # srcdir != objdir builds.
> LLVMSRCDIR := $(shell $(LLVMBINPATH)/llvm-config --src-root)
>
> Modified: apple-local/branches/llvm/gcc/configure
> ===================================================================
> --- apple-local/branches/llvm/gcc/configure 2007-07-09 02:28:29 UTC
> (rev 129251)
> +++ apple-local/branches/llvm/gcc/configure 2007-07-09 17:56:42 UTC
> (rev 129252)
> @@ -309,7 +309,7 @@
> # include <unistd.h>
> #endif"
>
> -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 target_noncanonical build_subdir host_subdir
> target_subdir gcc_version_trigger gcc_version_full gcc_version
> GENINSRC CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT
> NO_MINUS_C_MINUS_O OUTPUT_OPTION CPP EGREP strict1_warn warn_cflags
> WERROR checkingenabled_flag nocommon_flag TREEBROWSER valgrind_path
> valgrind_path_defines valgrind_command coverage_flags
> enable_multilib enable_shared TARGET_SYSTEM_ROOT
> TARGET_SYSTEM_ROOT_DEFINE CROSS_SYSTEM_HEADER_DIR onestep DSYMUTIL
> LLVMBASEPATH SET_MAKE AWK LN_S LN RANLIB ac_ct_RANLIB ranl
> ib_flags INSTALL INSTALL_PROGRAM INSTALL_DATA make_compare_target
> have_mktemp_command MAKEINFO BUILD_INFO GENERATED_MANPAGES FLEX
> BISON NM AR stage1_cflags COLLECT2_LIBS GNAT_LIBEXC LDEXP_LIB
> TARGET_GETGROUPS_T LIBICONV LTLIBICONV LIBICONV_DEP manext objext
> gthread_flags extra_modes_file PACKAGE VERSION USE_NLS LIBINTL
> LIBINTL_DEP INCINTL XGETTEXT GMSGFMT POSUB CATALOGS
> cc_for_cross_gnattools CROSS ALL SYSTEM_HEADER_DIR inhibit_libc
> CC_FOR_BUILD BUILD_CFLAGS STMP_FIXINC STMP_FIXPROTO collect2
> libgcc_visibility GGC zlibdir zlibinc MAINT gcc_tooldir dollar
> slibdir objdir subdirs srcdir all_boot_languages all_compilers
> all_gtfiles all_gtfiles_files_langs all_gtfiles_files_files
> all_lang_makefrags all_lang_makefiles all_languages all_stagestuff
> build_exeext build_install_headers_dir build_xm_file_list
> build_xm_include_list build_xm_defines check_languages
> cc_set_by_configure quoted_cc_set_by_configure cpp_install_dir
> xmake_file tmake_file extra_gcc_objs extra_headers_list extra_
> objs extra_parts extra_passes extra_programs float_h_file
> gcc_config_arguments gcc_gxx_include_dir libstdcxx_incdir
> host_exeext host_xm_file_list host_xm_include_list host_xm_defines
> out_host_hook_obj install lang_opt_files lang_specs_files
> lang_tree_files local_prefix md_file objc_boehm_gc out_file
> out_cxx_file out_object_file out_cxx_object_file
> stage_prefix_set_by_configure quoted_stage_prefix_set_by_configure
> thread_file tm_file_list tm_include_list tm_defines tm_p_file_list
> tm_p_include_list xm_file_list xm_include_list xm_defines
> c_target_objs cxx_target_objs target_cpu_default set_gcc_lib_path
> GMPLIBS GMPINC 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 target_noncanonical build_subdir host_subdir
> target_subdir gcc_version_trigger gcc_version_full gcc_version
> GENINSRC CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT
> NO_MINUS_C_MINUS_O OUTPUT_OPTION CPP EGREP strict1_warn warn_cflags
> WERROR checkingenabled_flag nocommon_flag TREEBROWSER valgrind_path
> valgrind_path_defines valgrind_command coverage_flags
> enable_multilib enable_shared TARGET_SYSTEM_ROOT
> TARGET_SYSTEM_ROOT_DEFINE CROSS_SYSTEM_HEADER_DIR onestep DSYMUTIL
> LLVMBASEPATH LLVMBUILDMODE SET_MAKE AWK LN_S LN RANLIB ac_
> ct_RANLIB ranlib_flags INSTALL INSTALL_PROGRAM INSTALL_DATA
> make_compare_target have_mktemp_command MAKEINFO BUILD_INFO
> GENERATED_MANPAGES FLEX BISON NM AR stage1_cflags COLLECT2_LIBS
> GNAT_LIBEXC LDEXP_LIB TARGET_GETGROUPS_T LIBICONV LTLIBICONV
> LIBICONV_DEP manext objext gthread_flags extra_modes_file PACKAGE
> VERSION USE_NLS LIBINTL LIBINTL_DEP INCINTL XGETTEXT GMSGFMT POSUB
> CATALOGS cc_for_cross_gnattools CROSS ALL SYSTEM_HEADER_DIR
> inhibit_libc CC_FOR_BUILD BUILD_CFLAGS STMP_FIXINC STMP_FIXPROTO
> collect2 libgcc_visibility GGC zlibdir zlibinc MAINT gcc_tooldir
> dollar slibdir objdir subdirs srcdir all_boot_languages
> all_compilers all_gtfiles all_gtfiles_files_langs
> all_gtfiles_files_files all_lang_makefrags all_lang_makefiles
> all_languages all_stagestuff build_exeext build_install_headers_dir
> build_xm_file_list build_xm_include_list build_xm_defines
> check_languages cc_set_by_configure quoted_cc_set_by_configure
> cpp_install_dir xmake_file tmake_file extra_gcc_objs extra_heade
> rs_list extra_objs extra_parts extra_passes extra_programs
> float_h_file gcc_config_arguments gcc_gxx_include_dir
> libstdcxx_incdir host_exeext host_xm_file_list host_xm_include_list
> host_xm_defines out_host_hook_obj install lang_opt_files
> lang_specs_files lang_tree_files local_prefix md_file objc_boehm_gc
> out_file out_cxx_file out_object_file out_cxx_object_file
> stage_prefix_set_by_configure quoted_stage_prefix_set_by_configure
> thread_file tm_file_list tm_include_list tm_defines tm_p_file_list
> tm_p_include_list xm_file_list xm_include_list xm_defines
> c_target_objs cxx_target_objs target_cpu_default set_gcc_lib_path
> GMPLIBS GMPINC LIBOBJS LTLIBOBJS'
> ac_subst_files='language_hooks'
>
> # Initialize some variables set by options.
> @@ -7089,10 +7089,28 @@
>
> if test -x "$LLVMBASEPATH/Release/bin/llc$EXEEXT"; then
> echo Found Release LLVM Tree in $LLVMBASEPATH
> + LLVMBUILDMODE="Release"
> elif test -x "$LLVMBASEPATH/Debug/bin/llc$EXEEXT"; then
> echo Found Debug LLVM Tree in $LLVMBASEPATH
> + LLVMBUILDMODE="Debug"
> elif test -x "$LLVMBASEPATH/Release-Asserts/bin/llc$EXEEXT"; then
> echo Found Release-Asserts LLVM Tree in $LLVMBASEPATH
> + LLVMBUILDMODE="Release-Asserts"
> + elif test -x "$LLVMBASEPATH/Debug-Asserts/bin/llc$EXEEXT"; then
> + echo Found Debug-Asserts LLVM Tree in $LLVMBASEPATH
> + LLVMBUILDMODE="Debug-Asserts"
> + elif test -x "$LLVMBASEPATH/Release+Checks/bin/llc$EXEEXT"; then
> + echo Found Release+Checks LLVM Tree in $LLVMBASEPATH
> + LLVMBUILDMODE="Release+Checks"
> + elif test -x "$LLVMBASEPATH/Debug+Checks/bin/llc$EXEEXT"; then
> + echo Found Debug+Checks LLVM Tree in $LLVMBASEPATH
> + LLVMBUILDMODE="Debug+Checks"
> + elif test -x "$LLVMBASEPATH/Release-Asserts+Checks/bin/llc
> $EXEEXT"; then
> + echo Found Release-Asserts+Checks LLVM Tree in $LLVMBASEPATH
> + LLVMBUILDMODE="Release-Asserts+Checks"
> + elif test -x "$LLVMBASEPATH/Debug-Asserts+Checks/bin/llc$EXEEXT";
> then
> + echo Found Debug-Asserts+Checks LLVM Tree in $LLVMBASEPATH
> + LLVMBUILDMODE="Debug-Asserts+Checks"
> else
> { { echo "$as_me:$LINENO: error: You must specify valid path
> to your LLVM tree with --enable-llvm=DIR" >&5
> echo "$as_me: error: You must specify valid path to your LLVM tree
> with --enable-llvm=DIR" >&2;}
> @@ -7101,8 +7119,12 @@
>
> else
> LLVMBASEPATH=""
> + LLVMBUILDMODE=""
> +
> fi;
>
> +# Send llvm build mode to gcc Makefiles
> +
> # APPLE LOCAL end LLVM
>
> # Sanity check enable_languages in case someone does not run the
> toplevel
> @@ -7732,7 +7754,7 @@
> else
> ac_prog_version=`$MAKEINFO --version 2>&1 |
> sed -n 's/^.*GNU texinfo.* \([0-9][0-9.]*\).*$/
> \1/p'`
> - echo "configure:7735: version of makeinfo is $ac_prog_version" >&5
> + echo "configure:7757: version of makeinfo is $ac_prog_version" >&5
> case $ac_prog_version in
> '') gcc_cv_prog_makeinfo_modern=no;;
> 4.[2-9]*)
> @@ -16669,6 +16691,7 @@
> s, at onestep@,$onestep,;t t
> s, at DSYMUTIL@,$DSYMUTIL,;t t
> s, at LLVMBASEPATH@,$LLVMBASEPATH,;t t
> +s, at LLVMBUILDMODE@,$LLVMBUILDMODE,;t t
> s, at SET_MAKE@,$SET_MAKE,;t t
> s, at AWK@,$AWK,;t t
> s, at LN_S@,$LN_S,;t t
>
> Modified: apple-local/branches/llvm/gcc/configure.ac
> ===================================================================
> --- apple-local/branches/llvm/gcc/configure.ac 2007-07-09 02:28:29
> UTC (rev 129251)
> +++ apple-local/branches/llvm/gcc/configure.ac 2007-07-09 17:56:42
> UTC (rev 129252)
> @@ -745,16 +745,38 @@
>
> if test -x "$LLVMBASEPATH/Release/bin/llc$EXEEXT"; then
> echo Found Release LLVM Tree in $LLVMBASEPATH
> + LLVMBUILDMODE="Release"
> elif test -x "$LLVMBASEPATH/Debug/bin/llc$EXEEXT"; then
> echo Found Debug LLVM Tree in $LLVMBASEPATH
> + LLVMBUILDMODE="Debug"
> elif test -x "$LLVMBASEPATH/Release-Asserts/bin/llc$EXEEXT"; then
> echo Found Release-Asserts LLVM Tree in $LLVMBASEPATH
> + LLVMBUILDMODE="Release-Asserts"
> + elif test -x "$LLVMBASEPATH/Debug-Asserts/bin/llc$EXEEXT"; then
> + echo Found Debug-Asserts LLVM Tree in $LLVMBASEPATH
> + LLVMBUILDMODE="Debug-Asserts"
> + elif test -x "$LLVMBASEPATH/Release+Checks/bin/llc$EXEEXT"; then
> + echo Found Release+Checks LLVM Tree in $LLVMBASEPATH
> + LLVMBUILDMODE="Release+Checks"
> + elif test -x "$LLVMBASEPATH/Debug+Checks/bin/llc$EXEEXT"; then
> + echo Found Debug+Checks LLVM Tree in $LLVMBASEPATH
> + LLVMBUILDMODE="Debug+Checks"
> + elif test -x "$LLVMBASEPATH/Release-Asserts+Checks/bin/llc
> $EXEEXT"; then
> + echo Found Release-Asserts+Checks LLVM Tree in $LLVMBASEPATH
> + LLVMBUILDMODE="Release-Asserts+Checks"
> + elif test -x "$LLVMBASEPATH/Debug-Asserts+Checks/bin/llc$EXEEXT";
> then
> + echo Found Debug-Asserts+Checks LLVM Tree in $LLVMBASEPATH
> + LLVMBUILDMODE="Debug-Asserts+Checks"
> else
> AC_MSG_ERROR([You must specify valid path to your LLVM tree
> with --enable-llvm=DIR])
> fi
> ],
> -[LLVMBASEPATH=""])
> +[LLVMBASEPATH=""
> + LLVMBUILDMODE=""
> +])
> AC_SUBST(LLVMBASEPATH)
> +# Send llvm build mode to gcc Makefiles
> +AC_SUBST(LLVMBUILDMODE)
> # APPLE LOCAL end LLVM
>
> # Sanity check enable_languages in case someone does not run the
> toplevel
>
> Modified: apple-local/branches/llvm/libcpp/configure
> ===================================================================
> --- apple-local/branches/llvm/libcpp/configure 2007-07-09 02:28:29
> UTC (rev 129251)
> +++ apple-local/branches/llvm/libcpp/configure 2007-07-09 17:56:42
> UTC (rev 129252)
> @@ -8023,10 +8023,28 @@
>
> if test -x "$LLVMBASEPATH/Release/bin/llc$EXEEXT"; then
> echo Found Release LLVM Tree in $LLVMBASEPATH
> + LLVMBUILDMODE="Release"
> elif test -x "$LLVMBASEPATH/Debug/bin/llc$EXEEXT"; then
> echo Found Debug LLVM Tree in $LLVMBASEPATH
> + LLVMBUILDMODE="Debug"
> elif test -x "$LLVMBASEPATH/Release-Asserts/bin/llc$EXEEXT"; then
> echo Found Release-Asserts LLVM Tree in $LLVMBASEPATH
> + LLVMBUILDMODE="Release-Asserts"
> + elif test -x "$LLVMBASEPATH/Debug-Asserts/bin/llc$EXEEXT"; then
> + echo Found Debug-Asserts LLVM Tree in $LLVMBASEPATH
> + LLVMBUILDMODE="Debug-Asserts"
> + elif test -x "$LLVMBASEPATH/Release+Checks/bin/llc$EXEEXT"; then
> + echo Found Release+Checks LLVM Tree in $LLVMBASEPATH
> + LLVMBUILDMODE="Release+Checks"
> + elif test -x "$LLVMBASEPATH/Debug+Checks/bin/llc$EXEEXT"; then
> + echo Found Debug+Checks LLVM Tree in $LLVMBASEPATH
> + LLVMBUILDMODE="Debug+Checks"
> + elif test -x "$LLVMBASEPATH/Release-Asserts+Checks/bin/llc
> $EXEEXT"; then
> + echo Found Release-Asserts+Checks LLVM Tree in $LLVMBASEPATH
> + LLVMBUILDMODE="Release-Asserts+Checks"
> + elif test -x "$LLVMBASEPATH/Debug-Asserts+Checks/bin/llc$EXEEXT";
> then
> + echo Found Debug-Asserts+Checks LLVM Tree in $LLVMBASEPATH
> + LLVMBUILDMODE="Debug-Asserts+Checks"
> else
> { { echo "$as_me:$LINENO: error: You must specify valid path
> to your LLVM tree with --enable-llvm=DIR" >&5
> echo "$as_me: error: You must specify valid path to your LLVM tree
> with --enable-llvm=DIR" >&2;}
>
> Modified: apple-local/branches/llvm/libcpp/configure.ac
> ===================================================================
> --- apple-local/branches/llvm/libcpp/configure.ac 2007-07-09
> 02:28:29 UTC (rev 129251)
> +++ apple-local/branches/llvm/libcpp/configure.ac 2007-07-09
> 17:56:42 UTC (rev 129252)
> @@ -108,9 +108,7 @@
> case $target in
> # APPLE LOCAL begin 4126124
> alpha*-*-* | \
> - #APPLE LOCAL begin LLVM
> arm*-*-*eabi* | \
> - #APPLE LOCAL end LLVM
> arm*-*-symbianelf* | \
> x86_64-*-* | \
> ia64-*-* | \
> @@ -161,10 +159,28 @@
>
> if test -x "$LLVMBASEPATH/Release/bin/llc$EXEEXT"; then
> echo Found Release LLVM Tree in $LLVMBASEPATH
> + LLVMBUILDMODE="Release"
> elif test -x "$LLVMBASEPATH/Debug/bin/llc$EXEEXT"; then
> echo Found Debug LLVM Tree in $LLVMBASEPATH
> + LLVMBUILDMODE="Debug"
> elif test -x "$LLVMBASEPATH/Release-Asserts/bin/llc$EXEEXT"; then
> echo Found Release-Asserts LLVM Tree in $LLVMBASEPATH
> + LLVMBUILDMODE="Release-Asserts"
> + elif test -x "$LLVMBASEPATH/Debug-Asserts/bin/llc$EXEEXT"; then
> + echo Found Debug-Asserts LLVM Tree in $LLVMBASEPATH
> + LLVMBUILDMODE="Debug-Asserts"
> + elif test -x "$LLVMBASEPATH/Release+Checks/bin/llc$EXEEXT"; then
> + echo Found Release+Checks LLVM Tree in $LLVMBASEPATH
> + LLVMBUILDMODE="Release+Checks"
> + elif test -x "$LLVMBASEPATH/Debug+Checks/bin/llc$EXEEXT"; then
> + echo Found Debug+Checks LLVM Tree in $LLVMBASEPATH
> + LLVMBUILDMODE="Debug+Checks"
> + elif test -x "$LLVMBASEPATH/Release-Asserts+Checks/bin/llc
> $EXEEXT"; then
> + echo Found Release-Asserts+Checks LLVM Tree in $LLVMBASEPATH
> + LLVMBUILDMODE="Release-Asserts+Checks"
> + elif test -x "$LLVMBASEPATH/Debug-Asserts+Checks/bin/llc$EXEEXT";
> then
> + echo Found Debug-Asserts+Checks LLVM Tree in $LLVMBASEPATH
> + LLVMBUILDMODE="Debug-Asserts+Checks"
> else
> AC_MSG_ERROR([You must specify valid path to your LLVM tree
> with --enable-llvm=DIR])
> fi
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list