mirror of
https://github.com/yann64/haikuports.git
synced 2026-05-03 05:28:53 +02:00
gcc: fix resulting c++ headers, bump revision.
This fixes crashes related to libstdc++ introduced by the switch to gcc-syslibs.
This commit is contained in:
@@ -8,7 +8,7 @@ HOMEPAGE="http://gcc.gnu.org"
|
||||
srcGitRev="4947d64591fdd9764dad9ff6835ffbef1618e17f"
|
||||
SRC_URI="https://github.com/haiku/buildtools/archive/$srcGitRev.tar.gz"
|
||||
CHECKSUM_SHA256="cb9261a3d3ab6e9c4ca5f2cd772a46439490ce525062c5fd2b2d04f50ad45619"
|
||||
REVISION="1"
|
||||
REVISION="2"
|
||||
LICENSE="
|
||||
GNU GPL v2
|
||||
GNU LGPL v2
|
||||
@@ -117,6 +117,10 @@ BUILD()
|
||||
|
||||
make $jobArgs
|
||||
|
||||
echo "######################## building special libraries ################"
|
||||
|
||||
echo "### libgcc"
|
||||
|
||||
# build kernel versions of libgcc.a and libgcc_eh.a (no threads or TLS)
|
||||
cd $objectsDir/$effectiveTargetMachineTriple/libgcc
|
||||
mkdir -p saved
|
||||
@@ -126,8 +130,12 @@ BUILD()
|
||||
make CFLAGS="-O2 $kernelCcFlags" CXXFLAGS="-O2 $kernelCcFlags"
|
||||
mv libgcc.a libgcc-kernel.a
|
||||
mv libgcc_eh.a libgcc_eh-kernel.a
|
||||
ln -sfn "$sourceDir/libgcc/gthr-posix.h" gthr-default.h
|
||||
mv saved/* .
|
||||
rmdir saved
|
||||
|
||||
echo "### libsupc++"
|
||||
|
||||
# Build a shared libsupc++ from libsupc++.a (hacking the gcc build system
|
||||
# to build a shared libsupc++ yields pretty much the same result, so we
|
||||
# use this simpler approach).
|
||||
@@ -137,17 +145,23 @@ BUILD()
|
||||
# build kernel version of libsupc++.a (without threads or TLS)
|
||||
mkdir -p saved
|
||||
mv .libs/libsupc++* saved/
|
||||
cp "../include/$effectiveTargetMachineTriple/bits/gthr-default.h" \
|
||||
"../config.h" \
|
||||
"../include/$effectiveTargetMachineTriple/bits/c++config.h" \
|
||||
saved/
|
||||
make clean
|
||||
# deactivate threads and tls support
|
||||
cp "../include/$effectiveTargetMachineTriple/bits/gthr-single.h" \
|
||||
"../include/$effectiveTargetMachineTriple/bits/gthr-default.h"
|
||||
sed -i -e 's,#define _GLIBCXX_HAVE_TLS 1,/* #undef _GLIBCXX_HAVE_TLS */,' \
|
||||
"../include/$effectiveTargetMachineTriple/bits/c++config.h"
|
||||
sed -i -e 's,#define _GLIBCXX_HAS_GTHREADS 1,/* #undef _GLIBCXX_HAS_GTHREADS */,' \
|
||||
"../config.h"
|
||||
sed -i -e 's,#define _GLIBCXX_HAVE_TLS 1,/* #undef _GLIBCXX_HAVE_TLS */,' \
|
||||
"../include/$effectiveTargetMachineTriple/bits/c++config.h"
|
||||
make CFLAGS="-O2 $kernelCcFlags" CXXFLAGS="-O2 $kernelCcFlags"
|
||||
mv .libs/libsupc++.a .libs/libsupc++-kernel.a
|
||||
mv saved/* .libs/
|
||||
mv saved/libsupc++* .libs/
|
||||
mv saved/gthr-default.h "../include/$effectiveTargetMachineTriple/bits/"
|
||||
mv saved/config.h ..
|
||||
mv saved/c++config.h "../include/$effectiveTargetMachineTriple/bits/"
|
||||
rmdir saved
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user