[2.2 BRANCH] Fix broken BUILD_GCC/CXX support

Deepak Bhole dbhole at redhat.com
Wed May 16 04:50:50 PDT 2012


* Dr Andrew John Hughes <ahughes at redhat.com> [2012-05-16 05:02]:
> In merging in the u4 changes, some changes were made to the way the
> names of the C and C++ compiler binaries are set (due to integration
> of build-infra changes in HotSpot).  The merge was done correctly for
> builds without BUILD_GCC/CXX set, but not with, as I discovered after
> when building via IcedTea.
> 
> The following patch fixes this.  Is it ok for the 2.2 branch?  The build
> via IcedTea is broken without it.
> 
> We need to look at the build-infra changes in more detail, but they make
> this local change (which allows something other than 'g++' or 'gcc' to be
> used as the compiler binary) unnecessary in 8 (the changes are only partially
> in 7u; they aren't in the jdk trees).
> 
> (Note that BUILD_GCC/CXX replaces the need for GCC_SUFFIX with a more general
> solution.  The fact that there was still a reference in there to GCC_SUFFIX
> was a mistake as it's no longer set).


Looks fine to me. OK for 2.2 and HEAD

Cheers,
Deepak

> -- 
> Andrew :)
> 
> Free Java Software Engineer
> Red Hat, Inc. (http://www.redhat.com)
> 
> PGP Key: 248BDC07 (https://keys.indymedia.org/)
> Fingerprint = EC5A 1F5E C0AD 1D15 8F1F  8F91 3B96 A578 248B DC07

> # HG changeset patch
> # User andrew
> # Date 1335994552 -3600
> # Node ID 5be91de8b779b6cf5a8236d4a2b51b5736da6852
> # Parent  11f2ed4d21418f2fa9fc6cf520ff84b30c425c34
> Make {HOST,BUILD}_{GCC,CPP} work again, post build-infra changes.  Rename {HOST_BUILD}_CPP to {HOST_BUILD}_CXX.
> 
> diff --git a/make/linux/makefiles/gcc.make b/make/linux/makefiles/gcc.make
> --- a/make/linux/makefiles/gcc.make
> +++ b/make/linux/makefiles/gcc.make
> @@ -26,40 +26,40 @@
>  # CC, CXX & AS
>  
>  ifndef HOST_GCC
> +ifdef CROSS_COMPILE_ARCH
>  HOST_GCC = gcc
> +else
> +HOST_GCC = $(CC)
> +endif
>  endif
>  
> -ifndef HOST_CPP
> -HOST_CPP = g++
> +ifndef HOST_CXX
> +ifdef CROSS_COMPILE_ARCH
> +HOST_CXX = g++
> +else
> +HOST_CXX = $(CXX)
> +endif
>  endif
>  
>  ifndef BUILD_GCC
>  ifdef CROSS_COMPILE_ARCH
>  BUILD_GCC  = $(ALT_COMPILER_PATH)/gcc
> -CXX = $(ALT_COMPILER_PATH)/g++
> -CC  = $(ALT_COMPILER_PATH)/gcc
> -HOSTCXX = g++
> -HOSTCC  = gcc
>  else
>  BUILD_GCC = gcc
> -CXX = g++
> -CC  = gcc
> -HOSTCXX = $(CXX)
> -HOSTCC  = $(CC)
>  endif
>  endif
>  
> -ifndef BUILD_CPP
> +ifndef BUILD_CXX
>  ifdef CROSS_COMPILE_ARCH
> -BUILD_CPP = $(ALT_COMPILER_PATH)/g++$(GCC_SUFFIX)
> +BUILD_CXX = $(ALT_COMPILER_PATH)/g++
>  else
> -BUILD_CPP = g++
> +BUILD_CXX = g++
>  endif
>  endif
>  
> -CPP = $(BUILD_CPP)
> +CXX = $(BUILD_CXX)
>  CC = $(BUILD_GCC)
> -HOSTCPP = $(HOST_CPP)
> +HOSTCXX = $(HOST_CXX)
>  HOSTCC  = $(HOST_GCC)
>  
>  AS  = $(CC) -c






More information about the distro-pkg-dev mailing list