* When using the non-legacy compiler, use the c++ and gcc headers

provided in the gcc_syslibs_devel build feature for building Haiku.
* Simplify declaration of c++ and gcc headers for the legacy compiler -
  in the end we always use the ones living by our source tree anyway.
* Fix a couple of missing local declarations for jam variables, which
  were necessary to avoid a build problem with strace. There are
  probably more bugs like these hiding in our build system files, but
  I'm saving the fix for those to the next commit.
* Add new gcc packages to the HaikuPorts (x86*-)repositories.
This commit is contained in:
Oliver Tappe
2014-08-13 13:32:34 +02:00
parent a07cdb6e9f
commit afde44733f
12 changed files with 45 additions and 26 deletions
+9
View File
@@ -8,6 +8,15 @@ local architectureObject ;
for architectureObject in [ MultiArchSubDirSetup ] { for architectureObject in [ MultiArchSubDirSetup ] {
on $(architectureObject) { on $(architectureObject) {
include [ FDirName $(HAIKU_BUILD_RULES_DIR) BuildFeatures ] ; include [ FDirName $(HAIKU_BUILD_RULES_DIR) BuildFeatures ] ;
# Let the target platform depend on the external header directories such
# that those will be unpacked before anything is built for the target
# platform.
Depends $(TARGET_PLATFORM) : [
BuildFeatureAttribute gcc_syslibs_devel : c++-headers
] [
BuildFeatureAttribute gcc_syslibs_devel : gcc-headers
] ;
} }
} }
-8
View File
@@ -54,14 +54,6 @@ rule ArchitectureSetup architecture
} }
HAIKU_GCC_BASE_FLAGS_$(architecture) = $(gccBaseFlags) ; HAIKU_GCC_BASE_FLAGS_$(architecture) = $(gccBaseFlags) ;
# override gcc 2.95.3's header directory -- strictly necessary only when
# using the BeOS native compiler (since its headers are incompatible), but
# it doesn't harm for the cross-compiler either.
if $(gccVersion[1]) = 2 {
HAIKU_GCC_HEADERS_DIR_$(architecture)
= [ FDirName $(HAIKU_TOP) headers build gcc-2.95.3 ] ;
}
# initial state for flags etc. # initial state for flags etc.
HAIKU_C++_$(architecture) ?= $(HAIKU_CC_$(architecture)) ; HAIKU_C++_$(architecture) ?= $(HAIKU_CC_$(architecture)) ;
HAIKU_LINK_$(architecture) = $(HAIKU_CC_$(architecture)) ; HAIKU_LINK_$(architecture) = $(HAIKU_CC_$(architecture)) ;
+3
View File
@@ -866,6 +866,9 @@ SUPPORTED_PLATFORMS = haiku ;
# initializations that are required before anything is built for a specific # initializations that are required before anything is built for a specific
# platform can be forced by depending the pseudo target for the platform on the # platform can be forced by depending the pseudo target for the platform on the
# initializations. # initializations.
# This is currently used to unpack the external headers from the
# gcc_syslibs_devel build feature before anything is built for the target
# platform.
NotFile $(TARGET_PLATFORM) ; NotFile $(TARGET_PLATFORM) ;
NotFile host ; NotFile host ;
+9 -8
View File
@@ -137,7 +137,7 @@ rule PublicHeaders
local list = $(1) ; local list = $(1) ;
local dirs ; local dirs ;
local i ;
for i in $(list) { for i in $(list) {
dirs += [ FDirName $(HAIKU_TOP) headers os $(i) ] ; dirs += [ FDirName $(HAIKU_TOP) headers os $(i) ] ;
} }
@@ -154,6 +154,7 @@ rule PrivateHeaders
local list = $(1) ; local list = $(1) ;
local dirs ; local dirs ;
local i ;
for i in $(list) { for i in $(list) {
dirs += [ FDirName $(HAIKU_TOP) headers private $(i) ] ; dirs += [ FDirName $(HAIKU_TOP) headers private $(i) ] ;
} }
@@ -170,6 +171,7 @@ rule PrivateBuildHeaders
local list = $(1) ; local list = $(1) ;
local dirs ; local dirs ;
local i ;
for i in $(list) { for i in $(list) {
dirs += [ FDirName $(HAIKU_TOP) headers build private $(i) ] ; dirs += [ FDirName $(HAIKU_TOP) headers build private $(i) ] ;
} }
@@ -186,6 +188,7 @@ rule LibraryHeaders
local list = $(1) ; local list = $(1) ;
local dirs ; local dirs ;
local i ;
for i in $(list) { for i in $(list) {
dirs += [ FDirName $(HAIKU_TOP) headers libs $(i) ] ; dirs += [ FDirName $(HAIKU_TOP) headers libs $(i) ] ;
} }
@@ -453,17 +456,15 @@ rule FStandardHeaders architecture
local headers = ; local headers = ;
# The C++ headers. If specified, we use the compiler headers, otherwise # The C++ headers and gcc headers.
# the ones that come with our libstdc++. if $(architecture) != x86_gcc2 {
if $(HAIKU_C++_HEADERS_DIR_$(architecture)) { headers += [ C++HeaderDirectories $(architecture) ] ;
headers += $(HAIKU_C++_HEADERS_DIR_$(architecture)) ; headers += [ GccHeaderDirectories $(architecture) ] ;
} else { } else {
headers += [ FDirName $(HAIKU_TOP) headers cpp ] ; headers += [ FDirName $(HAIKU_TOP) headers cpp ] ;
headers += [ FDirName $(HAIKU_TOP) headers build gcc-2.95.3 ] ;
} }
# GCC headers
headers += $(HAIKU_GCC_HEADERS_DIR_$(architecture)) ;
# Use headers directory, to allow to do things like include <posix/string.h> # Use headers directory, to allow to do things like include <posix/string.h>
headers += [ FDirName $(HAIKU_TOP) headers ] ; headers += [ FDirName $(HAIKU_TOP) headers ] ;
+2 -1
View File
@@ -32,7 +32,8 @@ rule ExtractCatalogEntries target : sources : signature : regexp
localIncludesOption = $(HOST_LOCAL_INCLUDES_OPTION) ; localIncludesOption = $(HOST_LOCAL_INCLUDES_OPTION) ;
systemIncludesOption = $(HOST_SYSTEM_INCLUDES_OPTION) ; systemIncludesOption = $(HOST_SYSTEM_INCLUDES_OPTION) ;
} else { } else {
sysHeaders += $(TARGET_HDRS_$(TARGET_PACKAGING_ARCH)) ; sysHeaders += [ FStandardHeaders $(TARGET_PACKAGING_ARCH) ]
$(TARGET_HDRS_$(TARGET_PACKAGING_ARCH)) ;
defines += $(TARGET_DEFINES_$(TARGET_PACKAGING_ARCH)) defines += $(TARGET_DEFINES_$(TARGET_PACKAGING_ARCH))
$(TARGET_DEFINES) ; $(TARGET_DEFINES) ;
cc = $(TARGET_CC_$(TARGET_PACKAGING_ARCH)) ; cc = $(TARGET_CC_$(TARGET_PACKAGING_ARCH)) ;
+4 -1
View File
@@ -274,7 +274,8 @@ rule CreateAsmStructOffsetsHeader header : source
} }
} else { } else {
sysHeaders += $(TARGET_HDRS_$(TARGET_PACKAGING_ARCH)) ; sysHeaders += [ FStandardHeaders $(TARGET_PACKAGING_ARCH) ]
$(TARGET_HDRS_$(TARGET_PACKAGING_ARCH)) ;
defines += $(TARGET_DEFINES_$(TARGET_PACKAGING_ARCH)) defines += $(TARGET_DEFINES_$(TARGET_PACKAGING_ARCH))
$(TARGET_DEFINES) ; $(TARGET_DEFINES) ;
} }
@@ -491,6 +492,8 @@ rule LinkAgainst
local mapLibs = $(3:E=true) ; local mapLibs = $(3:E=true) ;
on $(target) { on $(target) {
local i ;
# map libraries, if desired and target platform is Haiku # map libraries, if desired and target platform is Haiku
local map = $(TARGET_LIBRARY_NAME_MAP_$(TARGET_PACKAGING_ARCH)) ; local map = $(TARGET_LIBRARY_NAME_MAP_$(TARGET_PACKAGING_ARCH)) ;
if $(PLATFORM) != host && $(mapLibs) = true && $(map) { if $(PLATFORM) != host && $(mapLibs) = true && $(map) {
+2 -1
View File
@@ -108,7 +108,8 @@ rule Object
} }
} else { } else {
sysHeaders += $(TARGET_HDRS_$(TARGET_PACKAGING_ARCH)) ; sysHeaders += [ FStandardHeaders $(TARGET_PACKAGING_ARCH) ]
$(TARGET_HDRS_$(TARGET_PACKAGING_ARCH)) ;
defines += $(TARGET_DEFINES_$(TARGET_PACKAGING_ARCH)) defines += $(TARGET_DEFINES_$(TARGET_PACKAGING_ARCH))
$(TARGET_DEFINES) ; $(TARGET_DEFINES) ;
} }
+5 -2
View File
@@ -44,7 +44,9 @@ RemotePackageRepository HaikuPorts
freetype-2.5.2-3 freetype-2.5.2-3
freetype_devel-2.5.2-3 freetype_devel-2.5.2-3
gawk-4.1.0-2 gawk-4.1.0-2
gcc-4.8.3_2014_05_28-2 gcc-4.8.3_2014_07_26-1
gcc_syslibs-4.8.3_2014_07_26-1
gcc_syslibs_devel-4.8.3_2014_07_26-1
gettext-0.18.1.1-5 gettext-0.18.1.1-5
gettext_libintl-0.18.1.1-5 gettext_libintl-0.18.1.1-5
git-1.8.3.4-2 git-1.8.3.4-2
@@ -177,6 +179,7 @@ RemotePackageRepository HaikuPorts
freetype_x86_gcc2-2.5.2-3 freetype_x86_gcc2-2.5.2-3
freetype_x86_gcc2_devel-2.5.2-3 freetype_x86_gcc2_devel-2.5.2-3
gcc_x86_gcc2-2.95.3_2014_07_26-1 gcc_x86_gcc2-2.95.3_2014_07_26-1
gcc_x86_gcc2_syslibs_devel-2.95.3_2014_07_26-1
gettext_x86_gcc2-0.18.1.1-5 gettext_x86_gcc2-0.18.1.1-5
gettext_x86_gcc2_libintl-0.18.1.1-5 gettext_x86_gcc2_libintl-0.18.1.1-5
glu_x86_gcc2-9.0.0-2 glu_x86_gcc2-9.0.0-2
@@ -244,7 +247,7 @@ RemotePackageRepository HaikuPorts
fossil fossil
freetype freetype
gawk gawk
# gcc gcc
gcc_x86_gcc2 gcc_x86_gcc2
gettext gettext
git git
+4 -2
View File
@@ -40,7 +40,9 @@ RemotePackageRepository HaikuPorts
freetype-2.5.2-3 freetype-2.5.2-3
freetype_devel-2.5.2-3 freetype_devel-2.5.2-3
gawk-4.1.0-2 gawk-4.1.0-2
gcc-4.8.3_2014_05_28-3 gcc-4.8.3_2014_07_26-1
gcc_syslibs-4.8.3_2014_07_26-1
gcc_syslibs_devel-4.8.3_2014_07_26-1
gettext-0.18.1.1-5 gettext-0.18.1.1-5
gettext_libintl-0.18.1.1-5 gettext_libintl-0.18.1.1-5
git-1.8.3.4-3 git-1.8.3.4-3
@@ -182,7 +184,7 @@ RemotePackageRepository HaikuPorts
fossil fossil
freetype freetype
gawk gawk
# gcc gcc
gettext gettext
git git
glu glu
+5 -2
View File
@@ -71,6 +71,7 @@ RemotePackageRepository HaikuPorts
friss-0.8beta-1 friss-0.8beta-1
gawk-4.1.0-2 gawk-4.1.0-2
gcc-2.95.3_2014_07_26-1 gcc-2.95.3_2014_07_26-1
gcc_syslibs_devel-2.95.3_2014_07_26-1
getconf-r260000-1 getconf-r260000-1
getopt-1.1.5-1 getopt-1.1.5-1
gettext-0.18.1.1-6 gettext-0.18.1.1-6
@@ -333,7 +334,9 @@ RemotePackageRepository HaikuPorts
ffmpeg_x86_devel-0.10.14-1 ffmpeg_x86_devel-0.10.14-1
freetype_x86-2.5.2-2 freetype_x86-2.5.2-2
freetype_x86_devel-2.5.2-2 freetype_x86_devel-2.5.2-2
gcc_x86-4.8.3_2014_05_28-3 gcc_x86-4.8.3_2014_07_26-1
gcc_x86_syslibs-4.8.3_2014_07_26-1
gcc_x86_syslibs_devel-4.8.3_2014_07_26-1
gettext_x86-0.18.1.1-6 gettext_x86-0.18.1.1-6
gettext_x86_libintl-0.18.1.1-6 gettext_x86_libintl-0.18.1.1-6
giflib_x86-5.1.0-1 giflib_x86-5.1.0-1
@@ -549,7 +552,7 @@ RemotePackageRepository HaikuPorts
friss friss
gawk gawk
gcc gcc
# gcc_x86 gcc_x86
getconf getconf
getopt getopt
gettext gettext
+1 -1
View File
@@ -31,7 +31,7 @@ for architectureObject in [ MultiArchSubDirSetup x86_gcc2 ] {
[ FDirName $(HAIKU_TOP) headers os kernel ] [ FDirName $(HAIKU_TOP) headers os kernel ]
[ FDirName $(HAIKU_TOP) headers os storage ] [ FDirName $(HAIKU_TOP) headers os storage ]
[ FDirName $(HAIKU_TOP) headers os support ] [ FDirName $(HAIKU_TOP) headers os support ]
$(HAIKU_GCC_HEADERS_DIR_x86_gcc2) [ FDirName $(HAIKU_TOP) headers build gcc-2.95.3 ]
# so that include_next will work # so that include_next will work
; ;
+1
View File
@@ -43,6 +43,7 @@ rule PreprocessSyscalls preprocessedHeader : header : architecture
$(TARGET_PRIVATE_SYSTEM_HEADERS_$(architecture)) $(TARGET_PRIVATE_SYSTEM_HEADERS_$(architecture))
[ ArchHeaders $(TARGET_ARCH_$(architecture)) ] [ ArchHeaders $(TARGET_ARCH_$(architecture)) ]
[ on $(preprocessedHeader) return $(SUBDIRSYSHDRS) $(SYSHDRS) ] [ on $(preprocessedHeader) return $(SUBDIRSYSHDRS) $(SYSHDRS) ]
[ FStandardHeaders $(architecture) ]
$(TARGET_HDRS_$(architecture)) ; $(TARGET_HDRS_$(architecture)) ;
HDRS on $(preprocessedHeader) = $(headers) ; HDRS on $(preprocessedHeader) = $(headers) ;