configure & build: Rework legacy GCC detection to parse versions outside of Jam.

Jam comparison logic is string-based, and so was detecting GCC >= 10
as being < 2. This rectifies that by removing the GCC version parsing
from Jam logic entirely, and setting various BuildConfig variables
instead.

Change-Id: I0c0ae3b9002fb5e77f9ca7a78600c91871657f03
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3293
Reviewed-by: Adrien Destugues <[email protected]>
Reviewed-by: Jérôme Duval <[email protected]>
Reviewed-by: Alex von Gluck IV <[email protected]>
This commit is contained in:
Augustin Cavalier
2020-10-09 01:20:02 +00:00
committed by Alex von Gluck IV
parent a3f0a36a79
commit 47320dd0ab
19 changed files with 54 additions and 74 deletions
+10 -16
View File
@@ -7,18 +7,13 @@ rule ArchitectureSetup architecture
# architecture), if this is the first invocation of the rule, and adds # architecture), if this is the first invocation of the rule, and adds
# the architecture to HAIKU_ARCHS, if not yet contained. # the architecture to HAIKU_ARCHS, if not yet contained.
# analyze GCC version
local gccVersion
= [ FAnalyzeGCCVersion HAIKU_GCC_RAW_VERSION_$(architecture) ] ;
HAIKU_GCC_VERSION_$(architecture) = $(gccVersion) ;
# enable GCC -pipe option, if requested # enable GCC -pipe option, if requested
local ccBaseFlags ; local ccBaseFlags ;
if $(HAIKU_USE_GCC_PIPE) = 1 { if $(HAIKU_USE_GCC_PIPE) = 1 {
ccBaseFlags = -pipe ; ccBaseFlags = -pipe ;
} }
if $(gccVersion[1]) >= 3 { if $(HAIKU_CC_IS_LEGACY_GCC_$(architecture)) != 1 {
# disable strict aliasing on anything newer than gcc 2 as it may lead to # disable strict aliasing on anything newer than gcc 2 as it may lead to
# unexpected results. # unexpected results.
# TODO: remove the -fno-strict-aliasing option when all code has been # TODO: remove the -fno-strict-aliasing option when all code has been
@@ -122,7 +117,7 @@ rule ArchitectureSetup architecture
HAIKU_WERROR_FLAGS_$(architecture) = ; HAIKU_WERROR_FLAGS_$(architecture) = ;
if $(gccVersion[1]) >= 4 { if $(HAIKU_CC_IS_LEGACY_GCC_$(architecture)) != 1 {
# TODO: Remove all these. # TODO: Remove all these.
HAIKU_WERROR_FLAGS_$(architecture) += -Wno-error=unused-but-set-variable HAIKU_WERROR_FLAGS_$(architecture) += -Wno-error=unused-but-set-variable
-Wno-error=deprecated -Wno-error=deprecated-declarations -Wno-error=deprecated -Wno-error=deprecated-declarations
@@ -149,7 +144,7 @@ rule ArchitectureSetup architecture
# TODO: Temporary work-around. Should be defined in the compiler specs # TODO: Temporary work-around. Should be defined in the compiler specs
HAIKU_LINKFLAGS_$(architecture) += -Xlinker --no-undefined ; HAIKU_LINKFLAGS_$(architecture) += -Xlinker --no-undefined ;
if $(gccVersion[1]) < 3 { if $(HAIKU_CC_IS_LEGACY_GCC_$(architecture)) = 1 {
HAIKU_DEFINES_$(architecture) += _BEOS_R5_COMPATIBLE_ ; HAIKU_DEFINES_$(architecture) += _BEOS_R5_COMPATIBLE_ ;
} }
@@ -222,7 +217,6 @@ rule KernelArchitectureSetup architecture
HAIKU_KERNEL_ARCH = $(HAIKU_ARCH) ; HAIKU_KERNEL_ARCH = $(HAIKU_ARCH) ;
local gccVersion = $(HAIKU_GCC_VERSION_$(architecture)) ;
local cpu = $(HAIKU_CPU_$(architecture)) ; local cpu = $(HAIKU_CPU_$(architecture)) ;
switch $(cpu) { switch $(cpu) {
@@ -352,8 +346,8 @@ rule KernelArchitectureSetup architecture
# C/C++ flags # C/C++ flags
local ccBaseFlags = -finline -fno-builtin ; local ccBaseFlags = -finline -fno-builtin ;
if $(gccVersion[1]) >= 4 { if $(HAIKU_CC_IS_LEGACY_GCC_$(architecture)) != 1 {
if $(HAIKU_CC_IS_CLANG_$(architecture)) != 1 { if ! $(HAIKU_CC_IS_CLANG_$(architecture)) {
# Clang does not yet understand this flag. # Clang does not yet understand this flag.
ccBaseFlags += -fno-semantic-interposition ; ccBaseFlags += -fno-semantic-interposition ;
} }
@@ -363,7 +357,8 @@ rule KernelArchitectureSetup architecture
local c++BaseFlags = $(ccBaseFlags) -fno-exceptions ; local c++BaseFlags = $(ccBaseFlags) -fno-exceptions ;
if $(gccVersion[1]) >= 3 && $(HAIKU_CC_IS_CLANG_$(architecture)) != 1 { if $(HAIKU_CC_IS_LEGACY_GCC_$(architecture)) != 1
&& $(HAIKU_CC_IS_CLANG_$(architecture)) != 1 {
c++BaseFlags += -fno-use-cxa-atexit ; c++BaseFlags += -fno-use-cxa-atexit ;
} }
@@ -501,7 +496,7 @@ rule KernelArchitectureSetup architecture
} else { } else {
HAIKU_BOOT_$(bootTarget:U)_LDFLAGS += -m elf_i386_haiku ; HAIKU_BOOT_$(bootTarget:U)_LDFLAGS += -m elf_i386_haiku ;
} }
if $(gccVersion[1]) >= 3 { if $(HAIKU_CC_IS_LEGACY_GCC_$(architecture)) != 1 {
HAIKU_BOOT_$(bootTarget:U)_CCFLAGS += -Wno-error=main -m32 ; HAIKU_BOOT_$(bootTarget:U)_CCFLAGS += -Wno-error=main -m32 ;
HAIKU_BOOT_$(bootTarget:U)_C++FLAGS += -Wno-error=main -m32 ; HAIKU_BOOT_$(bootTarget:U)_C++FLAGS += -Wno-error=main -m32 ;
} }
@@ -514,7 +509,7 @@ rule KernelArchitectureSetup architecture
} else { } else {
HAIKU_BOOT_$(bootTarget:U)_LDFLAGS += -m elf_i386_haiku ; HAIKU_BOOT_$(bootTarget:U)_LDFLAGS += -m elf_i386_haiku ;
} }
if $(gccVersion[1]) >= 3 { if $(HAIKU_CC_IS_LEGACY_GCC_$(architecture)) != 1 {
HAIKU_BOOT_$(bootTarget:U)_CCFLAGS += -Wno-error=main -m32 ; HAIKU_BOOT_$(bootTarget:U)_CCFLAGS += -Wno-error=main -m32 ;
HAIKU_BOOT_$(bootTarget:U)_C++FLAGS += -Wno-error=main -m32 ; HAIKU_BOOT_$(bootTarget:U)_C++FLAGS += -Wno-error=main -m32 ;
} }
@@ -606,8 +601,7 @@ rule ArchitectureSetupWarnings architecture
# Work-around for GCC 2 problem -- despite -Wno-multichar it reports # Work-around for GCC 2 problem -- despite -Wno-multichar it reports
# multichar warnings in headers/private/kernel/debugger_keymaps.h included # multichar warnings in headers/private/kernel/debugger_keymaps.h included
# by src/system/kernel/arch/x86/arch_debug_console.cpp. # by src/system/kernel/arch/x86/arch_debug_console.cpp.
local gccVersion = $(HAIKU_GCC_VERSION_$(architecture)) ; if $(HAIKU_CC_IS_LEGACY_GCC_$(architecture)) = 1 {
if $(gccVersion[1]) = 2 {
local file = <src!system!kernel!arch!x86>arch_debug_console.o ; local file = <src!system!kernel!arch!x86>arch_debug_console.o ;
WARNINGS on $(file) = $(WARNINGS) ; WARNINGS on $(file) = $(WARNINGS) ;
} }
+1 -1
View File
@@ -447,7 +447,7 @@ rule InitArchitectureBuildFeatures architecture
# Add all secondary architectures as build features (with prefix). # Add all secondary architectures as build features (with prefix).
EnableBuildFeatures secondary_$(TARGET_PACKAGING_ARCHS[2-]) ; EnableBuildFeatures secondary_$(TARGET_PACKAGING_ARCHS[2-]) ;
if $(TARGET_GCC_VERSION_$(architecture)[1]) = 2 { if $(TARGET_CC_IS_LEGACY_GCC_$(architecture)) = 1 {
EnableBuildFeatures gcc2 ; EnableBuildFeatures gcc2 ;
} }
+8 -9
View File
@@ -239,12 +239,9 @@ HOST_ARCH ?= $(HOST_CPU) ;
HOST_ARCHS = $(HOST_ARCH) ; HOST_ARCHS = $(HOST_ARCH) ;
HOST_KERNEL_ARCH = host ; HOST_KERNEL_ARCH = host ;
# analyze GCC version
HOST_GCC_VERSION = [ FAnalyzeGCCVersion HOST_GCC_RAW_VERSION ] ;
# set packaging architecture # set packaging architecture
HOST_PACKAGING_ARCH ?= $(HOST_CPU) ; HOST_PACKAGING_ARCH ?= $(HOST_CPU) ;
if $(HOST_PACKAGING_ARCH) = x86 && $(HOST_GCC_VERSION[1]) = 2 { if $(HOST_PACKAGING_ARCH) = x86 && $(HOST_CC_IS_LEGACY_GCC) = 1 {
HOST_PACKAGING_ARCH = x86_gcc2 ; HOST_PACKAGING_ARCH = x86_gcc2 ;
} }
HOST_PACKAGING_ARCHS = $(HOST_PACKAGING_ARCH) ; HOST_PACKAGING_ARCHS = $(HOST_PACKAGING_ARCH) ;
@@ -276,7 +273,7 @@ HOST_C++FLAGS += -Wno-multichar ;
HOST_PIC_CCFLAGS += -fPIC ; HOST_PIC_CCFLAGS += -fPIC ;
HOST_PIC_C++FLAGS += -fPIC ; HOST_PIC_C++FLAGS += -fPIC ;
if $(HOST_GCC_VERSION[1]) >= 3 { if $(HOST_CC_IS_LEGACY_GCC) != 1 {
HOST_GCC_BASE_FLAGS += -fno-strict-aliasing -fno-delete-null-pointer-checks ; HOST_GCC_BASE_FLAGS += -fno-strict-aliasing -fno-delete-null-pointer-checks ;
} }
@@ -306,7 +303,7 @@ if $(HOST_ARCH) = m68k {
if $(HOST_PLATFORM) != darwin { if $(HOST_PLATFORM) != darwin {
# fix for new changes to DSO linking policies # fix for new changes to DSO linking policies
HOST_LINKFLAGS += -Xlinker --no-as-needed ; HOST_LINKFLAGS += -Xlinker --no-as-needed ;
if $(HOST_GCC_VERSION[1]) >= 3 { if $(HOST_CC_IS_LEGACY_GCC) != 1 {
HOST_LINKFLAGS += -Wl,--copy-dt-needed-entries ; HOST_LINKFLAGS += -Wl,--copy-dt-needed-entries ;
} }
} }
@@ -382,7 +379,7 @@ HOST_LIBBE = libbe_build.so ;
if $(HOST_PLATFORM_HAIKU_COMPATIBLE) { if $(HOST_PLATFORM_HAIKU_COMPATIBLE) {
# the C++ standard and support libraries # the C++ standard and support libraries
if $(HOST_GCC_VERSION[1]) < 3 { if $(HOST_CC_IS_LEGACY_GCC) = 1 {
HOST_LIBSTDC++ = stdc++.r4 ; HOST_LIBSTDC++ = stdc++.r4 ;
HOST_LIBSUPC++ = ; HOST_LIBSUPC++ = ;
} else { } else {
@@ -418,7 +415,7 @@ if $(HOST_PLATFORM_HAIKU_COMPATIBLE) {
HOST_PTHREAD_LINKFLAGS = -pthread ; HOST_PTHREAD_LINKFLAGS = -pthread ;
# the C++ support library # the C++ support library
if $(HOST_GCC_VERSION[1]) < 3 { if $(HOST_CC_IS_LEGACY_GCC) = 1 {
HOST_LIBSUPC++ = ; HOST_LIBSUPC++ = ;
} else { } else {
HOST_LIBSUPC++ = supc++ ; HOST_LIBSUPC++ = supc++ ;
@@ -586,10 +583,12 @@ local buildVars =
; ;
local archDependentBuildVars = local archDependentBuildVars =
ARCH CPU GCC_VERSION ARCH CPU
AR CC C++ ELFEDIT LD OBJCOPY RANLIB STRIP AR CC C++ ELFEDIT LD OBJCOPY RANLIB STRIP
CC_IS_LEGACY_GCC CC_IS_CLANG
ARFLAGS ASFLAGS UNARFLAGS CPPFLAGS CCFLAGS C++FLAGS HDRS LDFLAGS ARFLAGS ASFLAGS UNARFLAGS CPPFLAGS CCFLAGS C++FLAGS HDRS LDFLAGS
LINK LINKFLAGS LINK LINKFLAGS
+1 -29
View File
@@ -208,40 +208,12 @@ rule SetPlatformCompatibilityFlagVariables
?= $($(varPrefix)_PLATFORM_HAIKU_COMPATIBLE) ; ?= $($(varPrefix)_PLATFORM_HAIKU_COMPATIBLE) ;
} }
rule FAnalyzeGCCVersion
{
# FAnalyzeGCCVersion <rawVersionVariable> ;
#
local varName = $(1) ;
local rawVersion = $($(varName)) ;
if ! $(rawVersion) {
ECHO "Variable $(varName) not set. Please run ./configure or" ;
EXIT "specify it manually." ;
}
local version = ;
# split the raw version string at `.' and `-' characters
while $(rawVersion) {
local split = [ Match "([^.-]*)[.-](.*)" : $(rawVersion) ] ;
if $(split) {
version += $(split[1]) ;
rawVersion = $(split[2]) ;
} else {
version += $(rawVersion) ;
rawVersion = ;
}
}
return $(version) ;
}
rule SetIncludePropertiesVariables prefix : suffix rule SetIncludePropertiesVariables prefix : suffix
{ {
# SetIncludePropertiesVariables <prefix> : <suffix> ; # SetIncludePropertiesVariables <prefix> : <suffix> ;
# #
suffix = $(suffix:E=) ; suffix = $(suffix:E=) ;
if $($(prefix)_GCC_VERSION$(suffix)[1]) < 4 { if $($(prefix)_CC_IS_LEGACY_GCC$(suffix)) {
$(prefix)_INCLUDES_SEPARATOR$(suffix) = -I- ; $(prefix)_INCLUDES_SEPARATOR$(suffix) = -I- ;
$(prefix)_LOCAL_INCLUDES_OPTION$(suffix) = -I ; $(prefix)_LOCAL_INCLUDES_OPTION$(suffix) = -I ;
$(prefix)_SYSTEM_INCLUDES_OPTION$(suffix) = -I ; $(prefix)_SYSTEM_INCLUDES_OPTION$(suffix) = -I ;
+2 -3
View File
@@ -41,11 +41,10 @@ if [ IsOptionalHaikuImagePackageAdded BeBook ] {
# BeOSCompatibility # BeOSCompatibility
if [ IsOptionalHaikuImagePackageAdded BeOSCompatibility ] { if [ IsOptionalHaikuImagePackageAdded BeOSCompatibility ] {
if $(TARGET_ARCH) != x86 { if $(TARGET_ARCH) != x86
|| $(TARGET_CC_IS_LEGACY_GCC_$(TARGET_PACKAGING_ARCH)) != 1 {
Echo "No optional package BeOSCompatibility available for" Echo "No optional package BeOSCompatibility available for"
"$(TARGET_ARCH)" ; "$(TARGET_ARCH)" ;
} else if $(TARGET_GCC_VERSION_$(TARGET_PACKAGING_ARCH)[1]) >= 4 {
Echo "No optional package BeOSCompatibility available for gcc4" ;
} else { } else {
Echo "Warning: Adding BeOS compatibility symlinks. This will go away." Echo "Warning: Adding BeOS compatibility symlinks. This will go away."
"Please fix your apps!" ; "Please fix your apps!" ;
+1 -1
View File
@@ -93,7 +93,7 @@ AddLibrariesToPackage lib
: [ HaikuImageGetSystemLibs ] [ HaikuImageGetPrivateSystemLibs ] ; : [ HaikuImageGetSystemLibs ] [ HaikuImageGetPrivateSystemLibs ] ;
# libnetwork.so replaces quite a few libraries # libnetwork.so replaces quite a few libraries
if $(HAIKU_GCC_VERSION_$(architecture)[1]) = 2 { if $(HAIKU_CC_IS_LEGACY_GCC_$(architecture)) = 1 {
local libNetworkAliases = libsocket.so libbind.so libnet.so ; local libNetworkAliases = libsocket.so libbind.so libnet.so ;
local lib ; local lib ;
for lib in $(libNetworkAliases) { for lib in $(libNetworkAliases) {
+1 -1
View File
@@ -87,7 +87,7 @@ AddLibrariesToPackage lib
: [ HaikuImageGetSystemLibs ] [ HaikuImageGetPrivateSystemLibs ] ; : [ HaikuImageGetSystemLibs ] [ HaikuImageGetPrivateSystemLibs ] ;
# libnetwork.so replaces quite a few libraries # libnetwork.so replaces quite a few libraries
if $(HAIKU_GCC_VERSION_$(architecture)[1]) = 2 { if $(HAIKU_CC_IS_LEGACY_GCC_$(architecture)) = 1 {
local libNetworkAliases = libsocket.so libbind.so libnet.so ; local libNetworkAliases = libsocket.so libbind.so libnet.so ;
local lib ; local lib ;
for lib in $(libNetworkAliases) { for lib in $(libNetworkAliases) {
+1 -1
View File
@@ -93,7 +93,7 @@ for stage in _stage0 _stage1 "" {
if $(stage) != _stage0 { if $(stage) != _stage0 {
# cpp headers # cpp headers
if $(HAIKU_GCC_VERSION_$(architecture)[1]) = 2 { if $(HAIKU_CC_IS_LEGACY_GCC_$(architecture)) = 1 {
# GCC 2 only -- for GCC 4 they come with the DevelopmentBase package # GCC 2 only -- for GCC 4 they come with the DevelopmentBase package
CopyDirectoryToPackage $(developCrossHeadersDirTokens) c++ CopyDirectoryToPackage $(developCrossHeadersDirTokens) c++
: [ FDirName $(HAIKU_TOP) headers cpp ] : 2.95.3 ; : [ FDirName $(HAIKU_TOP) headers cpp ] : 2.95.3 ;
+1 -1
View File
@@ -79,7 +79,7 @@ AddHeaderDirectoryToPackage compatibility bsd : bsd ;
AddHeaderDirectoryToPackage compatibility gnu : gnu ; AddHeaderDirectoryToPackage compatibility gnu : gnu ;
# cpp headers # cpp headers
if $(HAIKU_GCC_VERSION_$(architecture)[1]) = 2 { if $(HAIKU_CC_IS_LEGACY_GCC_$(architecture)) = 1 {
# GCC 2 only -- for GCC 4 they come with the gcc package # GCC 2 only -- for GCC 4 they come with the gcc package
CopyDirectoryToPackage develop headers c++ CopyDirectoryToPackage develop headers c++
: [ FDirName $(HAIKU_TOP) headers cpp ] : 2.95.3 ; : [ FDirName $(HAIKU_TOP) headers cpp ] : 2.95.3 ;
+1 -1
View File
@@ -48,7 +48,7 @@ AddFilesToPackage develop lib $(architecture)
# ABI independent stuff # ABI independent stuff
# cpp headers # cpp headers
if $(HAIKU_GCC_VERSION_$(architecture)[1]) = 2 { if $(HAIKU_CC_IS_LEGACY_GCC_$(architecture)) = 1 {
# GCC 2 only -- for GCC 4 they come with the gcc package # GCC 2 only -- for GCC 4 they come with the gcc package
CopyDirectoryToPackage develop headers c++ CopyDirectoryToPackage develop headers c++
: [ FDirName $(HAIKU_TOP) headers cpp ] : 2.95.3 ; : [ FDirName $(HAIKU_TOP) headers cpp ] : 2.95.3 ;
+1 -1
View File
@@ -10,7 +10,7 @@ AddLibrariesToPackage lib $(architecture)
: [ HaikuImageGetSystemLibs ] [ HaikuImageGetPrivateSystemLibs ] ; : [ HaikuImageGetSystemLibs ] [ HaikuImageGetPrivateSystemLibs ] ;
# libnetwork.so replaces quite a few libraries # libnetwork.so replaces quite a few libraries
if $(HAIKU_GCC_VERSION_$(architecture)[1]) = 2 { if $(HAIKU_CC_IS_LEGACY_GCC_$(architecture)) = 1 {
local libNetworkAliases = libsocket.so libbind.so libnet.so ; local libNetworkAliases = libsocket.so libbind.so libnet.so ;
local lib ; local lib ;
for lib in $(libNetworkAliases) { for lib in $(libNetworkAliases) {
+1 -1
View File
@@ -11,7 +11,7 @@ AddLibrariesToPackage lib $(architecture)
: [ HaikuImageGetSystemLibs ] [ HaikuImageGetPrivateSystemLibs ] ; : [ HaikuImageGetSystemLibs ] [ HaikuImageGetPrivateSystemLibs ] ;
# libnetwork.so replaces quite a few libraries # libnetwork.so replaces quite a few libraries
if $(HAIKU_GCC_VERSION_$(architecture)[1]) = 2 { if $(HAIKU_CC_IS_LEGACY_GCC_$(architecture)) = 1 {
local libNetworkAliases = libsocket.so libbind.so libnet.so ; local libNetworkAliases = libsocket.so libbind.so libnet.so ;
local lib ; local lib ;
for lib in $(libNetworkAliases) { for lib in $(libNetworkAliases) {
Vendored
+18 -2
View File
@@ -239,6 +239,19 @@ valid_toolchain()
return 1 return 1
} }
# is_legacy_gcc
#
# Determines if the specified GCC version is a "legacy" (i.e. GCC < 4) one.
#
is_legacy_gcc()
{
if [ `echo $1 | cut -d'.' -f1` -lt 4 ]; then
echo 1
else
echo 0
fi
}
# standard_gcc_settings # standard_gcc_settings
# #
# Sets the variables for a GCC platform. # Sets the variables for a GCC platform.
@@ -331,6 +344,8 @@ standard_gcc_settings()
set_variable HAIKU_CPU_$targetArch $targetCpu set_variable HAIKU_CPU_$targetArch $targetCpu
get_build_tool_path CC_$targetArch "$gcc" get_build_tool_path CC_$targetArch "$gcc"
set_variable HAIKU_CC_IS_LEGACY_GCC_$targetArch \
`is_legacy_gcc $gccRawVersion`
set_variable HAIKU_CC_IS_CLANG_$targetArch $useClang set_variable HAIKU_CC_IS_CLANG_$targetArch $useClang
set_variable HAIKU_GCC_RAW_VERSION_$targetArch $gccRawVersion set_variable HAIKU_GCC_RAW_VERSION_$targetArch $gccRawVersion
set_variable HAIKU_GCC_MACHINE_$targetArch $gccMachine set_variable HAIKU_GCC_MACHINE_$targetArch $gccMachine
@@ -608,6 +623,7 @@ fi
# exported (BuildSetup) default parameter values # exported (BuildSetup) default parameter values
# #
HOST_GCC_RAW_VERSION=`$CC -dumpversion` HOST_GCC_RAW_VERSION=`$CC -dumpversion`
HOST_CC_IS_LEGACY_GCC=`is_legacy_gcc $HOST_GCC_RAW_VERSION`
HOST_GCC_MACHINE=`$CC -dumpmachine` HOST_GCC_MACHINE=`$CC -dumpmachine`
HAIKU_INCLUDE_SOURCES=0 HAIKU_INCLUDE_SOURCES=0
HAIKU_INCLUDE_3RDPARTY=0 HAIKU_INCLUDE_3RDPARTY=0
@@ -1082,7 +1098,7 @@ HAIKU_HOST_BUILD_ONLY ?= "${HAIKU_HOST_BUILD_ONLY}" ;
JAMSHELL ?= ${JAMSHELL} -c ; JAMSHELL ?= ${JAMSHELL} -c ;
HOST_CC ?= ${CC} ; HOST_CC ?= ${CC} ;
HOST_GCC_RAW_VERSION ?= ${HOST_GCC_RAW_VERSION} ; HOST_CC_IS_LEGACY_GCC ?= ${HOST_CC_IS_LEGACY_GCC} ;
HOST_GCC_MACHINE ?= ${HOST_GCC_MACHINE} ; HOST_GCC_MACHINE ?= ${HOST_GCC_MACHINE} ;
HOST_LD ?= ${HOST_GCC_LD} ; HOST_LD ?= ${HOST_GCC_LD} ;
HOST_OBJCOPY ?= ${HOST_GCC_OBJCOPY} ; HOST_OBJCOPY ?= ${HOST_GCC_OBJCOPY} ;
@@ -1103,11 +1119,11 @@ EOF
for targetArch in $HAIKU_PACKAGING_ARCHS; do for targetArch in $HAIKU_PACKAGING_ARCHS; do
variables=" variables="
HAIKU_CC HAIKU_CC HAIKU_CC HAIKU_CC
HAIKU_CC_IS_LEGACY_GCC HAIKU_CC_IS_LEGACY_GCC
HAIKU_CC_IS_CLANG HAIKU_CC_IS_CLANG HAIKU_CC_IS_CLANG HAIKU_CC_IS_CLANG
HAIKU_USE_GCC_GRAPHITE HAIKU_USE_GCC_GRAPHITE HAIKU_USE_GCC_GRAPHITE HAIKU_USE_GCC_GRAPHITE
HAIKU_CPU HAIKU_CPU HAIKU_CPU HAIKU_CPU
HAIKU_GCC_MACHINE HAIKU_GCC_MACHINE HAIKU_GCC_MACHINE HAIKU_GCC_MACHINE
HAIKU_GCC_RAW_VERSION HAIKU_GCC_RAW_VERSION
HAIKU_GCC_LIB_DIR HAIKU_GCC_LIB_DIR HAIKU_GCC_LIB_DIR HAIKU_GCC_LIB_DIR
HAIKU_BOOT_LIBGCC HAIKU_BOOT_LIBGCC HAIKU_BOOT_LIBGCC HAIKU_BOOT_LIBGCC
HAIKU_BOOT_LIBSUPC++ HAIKU_BOOT_LIBSUPCXX HAIKU_BOOT_LIBSUPC++ HAIKU_BOOT_LIBSUPCXX
+1 -1
View File
@@ -3,7 +3,7 @@ UseBuildFeatureHeaders glu ;
UseBuildFeatureHeaders mesa ; UseBuildFeatureHeaders mesa ;
# For GCC2 # For GCC2
if $(TARGET_GCC_VERSION_$(TARGET_PACKAGING_ARCH)[1]) < 3 { if $(TARGET_CC_IS_LEGACY_GCC_$(TARGET_PACKAGING_ARCH)) = 1 {
SubDirC++Flags --no-warnings ; SubDirC++Flags --no-warnings ;
} }
+2 -2
View File
@@ -4,7 +4,7 @@ SubDirHdrs [ FDirName $(SUBDIR) $(DOTDOT) shared ] ;
AddResources PNGTranslator : PNGTranslator.rdef ; AddResources PNGTranslator : PNGTranslator.rdef ;
if $(TARGET_GCC_VERSION_$(TARGET_PACKAGING_ARCH)[1]) = 2 { if $(TARGET_CC_IS_LEGACY_GCC_$(TARGET_PACKAGING_ARCH)) = 1 {
SubDirCcFlags -DPNG_NO_PEDANTIC_WARNINGS ; SubDirCcFlags -DPNG_NO_PEDANTIC_WARNINGS ;
} }
@@ -17,7 +17,7 @@ for architectureObject in [ MultiArchSubDirSetup ] {
Includes [ FGristFiles PNGTranslator.cpp PNGView.cpp ] Includes [ FGristFiles PNGTranslator.cpp PNGView.cpp ]
: [ BuildFeatureAttribute libpng : headers ] ; : [ BuildFeatureAttribute libpng : headers ] ;
Translator [ MultiArchDefaultGristFiles PNGTranslator ] : Translator [ MultiArchDefaultGristFiles PNGTranslator ] :
PNGMain.cpp PNGMain.cpp
PNGTranslator.cpp PNGTranslator.cpp
PNGView.cpp PNGView.cpp
+1 -1
View File
@@ -6,7 +6,7 @@ SEARCH_SOURCE += [ FDirName $(SUBDIR) mesh ] ;
SEARCH_SOURCE += [ FDirName $(SUBDIR) texture ] ; SEARCH_SOURCE += [ FDirName $(SUBDIR) texture ] ;
# For GCC2 # For GCC2
if $(TARGET_GCC_VERSION_$(TARGET_PACKAGING_ARCH)[1]) < 3 { if $(TARGET_CC_IS_LEGACY_GCC_$(TARGET_PACKAGING_ARCH)) = 1 {
SubDirC++Flags --no-warnings ; SubDirC++Flags --no-warnings ;
} }
+1 -1
View File
@@ -250,7 +250,7 @@ actions AtariBootPrgLd
local extraSources = ; local extraSources = ;
if $(TARGET_GCC_VERSION_$(TARGET_PACKAGING_ARCH)[1]) = 2 { if $(TARGET_CC_IS_LEGACY_GCC_$(TARGET_PACKAGING_ARCH)) = 1 {
extraSources += atomic.S ; extraSources += atomic.S ;
} }
+1 -1
View File
@@ -13,7 +13,7 @@ for architectureObject in [ MultiArchSubDirSetup x86 x86_gcc2 ] {
SEARCH_SOURCE += [ FDirName $(SUBDIR) $(DOTDOT) generic ] ; SEARCH_SOURCE += [ FDirName $(SUBDIR) $(DOTDOT) generic ] ;
local compatibilitySources ; local compatibilitySources ;
if $(TARGET_GCC_VERSION_$(architecture)[1]) = 2 { if $(TARGET_CC_IS_LEGACY_GCC_$(architecture)) = 1 {
compatibilitySources = compatibilitySources =
compatibility.c compatibility.c
; ;
+1 -1
View File
@@ -20,7 +20,7 @@ DEFINES += HAIKU_BUILD_COMPATIBILITY_H __STRICT_ANSI__ ;
defines = [ FDefines $(defines) ] ; defines = [ FDefines $(defines) ] ;
local c++flags = ; local c++flags = ;
if $(HOST_GCC_VERSION[1]) >= 3 { if $(HOST_CC_IS_LEGACY_GCC) != 1 {
c++flags += -std=c++11 ; c++flags += -std=c++11 ;
} }