summaryrefslogtreecommitdiff
path: root/src/stage2
diff options
context:
space:
mode:
authorAndreas Grapentin <andreas@grapentin.org>2018-06-22 09:31:53 +0200
committerAndreas Grapentin <andreas@grapentin.org>2018-06-22 09:31:53 +0200
commita5fd90dcce72f58af61880857d7ab0f2e44e9874 (patch)
tree727048402665b287675825a6d95a81fd356a18ab /src/stage2
parent56ec7e46cbdd2f7319574710d3ce3d38b9338108 (diff)
rebootstrapped powerpc64le toolchain with multilib, and added grub
Diffstat (limited to 'src/stage2')
-rw-r--r--src/stage2/patches/generic/binutils.patch35
-rw-r--r--src/stage2/patches/generic/gcc.patch26
-rw-r--r--src/stage2/patches/generic/glibc.patch24
-rw-r--r--src/stage2/patches/powerpc64le/binutils.patch27
4 files changed, 74 insertions, 38 deletions
diff --git a/src/stage2/patches/generic/binutils.patch b/src/stage2/patches/generic/binutils.patch
index 6f0895c..b7b6710 100644
--- a/src/stage2/patches/generic/binutils.patch
+++ b/src/stage2/patches/generic/binutils.patch
@@ -1,34 +1,7 @@
diff -rupN a/PKGBUILD b/PKGBUILD
---- a/PKGBUILD 2018-05-28 16:39:38.041700185 +0200
-+++ b/PKGBUILD 2018-05-28 16:42:42.595035360 +0200
-@@ -20,13 +20,15 @@ options=(staticlibs !distcc !ccache)
- source=(https://ftp.gnu.org/gnu/binutils/binutils-$pkgver.tar.xz{,.sig}
- 0001-PR22741-objcopy-segfault-on-fuzzed-COFF-object.patch
- 0002-PR22829-objcopy-strip-removes-PT_GNU_RELRO-from-lld-.patch
-- 0003-PR22836-r-s-doesnt-work-with-g3-using-GCC-7.patch)
-+ 0003-PR22836-r-s-doesnt-work-with-g3-using-GCC-7.patch
-+ https://raw.githubusercontent.com/archlinux32/packages/master/core/binutils/binutils-2.30-branch.patch)
- validpgpkeys=(3A24BC1E8FB409FA9F14371813FCEF89DD9E3C4F)
- md5sums=('ffc476dd46c96f932875d1b2e27e929f'
- 'SKIP'
- '469164f3c93a0e92a697537b60c9806c'
- '0c679b37e90fb23de60a4d28329b956a'
-- '53b5682e09c0a27e9994c3efdfe01d29')
-+ '53b5682e09c0a27e9994c3efdfe01d29'
-+ 'a5ba9fc9de327b2eff071e19429c6e67')
-
- prepare() {
- mkdir -p binutils-build
-@@ -43,14 +45,14 @@ prepare() {
- # https://sourceware.org/bugzilla/show_bug.cgi?id=22829
- patch -p1 -i "$srcdir/0002-PR22829-objcopy-strip-removes-PT_GNU_RELRO-from-lld-.patch"
-
-- # https://sourceware.org/bugzilla/show_bug.cgi?id=22836
-- patch -p1 -i "$srcdir/0003-PR22836-r-s-doesnt-work-with-g3-using-GCC-7.patch"
-+ patch -p1 -i "$srcdir/binutils-2.30-branch.patch"
- }
-
- build() {
+--- a/PKGBUILD 2018-06-20 07:56:40.877881835 +0200
++++ b/PKGBUILD 2018-06-20 11:07:26.331329370 +0200
+@@ -51,6 +51,7 @@ build() {
cd binutils-build
"$srcdir/binutils-$pkgver/configure" \
@@ -36,7 +9,7 @@ diff -rupN a/PKGBUILD b/PKGBUILD
--prefix=/usr \
--with-lib-path=/usr/lib:/usr/local/lib \
--with-bugurl=https://bugs.archlinux.org/ \
-@@ -66,7 +68,7 @@ build() {
+@@ -66,7 +67,7 @@ build() {
--disable-gdb \
--disable-werror \
--with-pic \
diff --git a/src/stage2/patches/generic/gcc.patch b/src/stage2/patches/generic/gcc.patch
index 98d6f8c..354d8a8 100644
--- a/src/stage2/patches/generic/gcc.patch
+++ b/src/stage2/patches/generic/gcc.patch
@@ -14,8 +14,8 @@ diff -rupN a/0001-pthread-reentrant.patch b/0001-pthread-reentrant.patch
+ -melf" XLEN_SPEC "lriscv \
+ %{shared} \
diff -rupN a/PKGBUILD b/PKGBUILD
---- a/PKGBUILD 2018-05-25 10:15:30.533015789 +0200
-+++ b/PKGBUILD 2018-05-25 10:18:49.539689424 +0200
+--- a/PKGBUILD 2018-06-19 08:33:15.147041639 +0200
++++ b/PKGBUILD 2018-06-19 08:56:49.223722416 +0200
@@ -5,8 +5,9 @@
# toolchain build order: linux-api-headers->glibc->binutils->gcc->binutils->glibc
# NOTE: libtool requires rebuilt with each new gcc version
@@ -230,3 +230,25 @@ diff -rupN a/PKGBUILD b/PKGBUILD
install-{toolexeclibDATA,nodist_fincludeHEADERS}
make -C $CHOST/libgomp DESTDIR="$pkgdir" install-nodist_fincludeHEADERS
make -C gcc DESTDIR="$pkgdir" fortran.install-{common,man,info}
+@@ -365,20 +355,12 @@ package_lib32-gcc-libs() {
+
+ for lib in libatomic \
+ libgfortran \
+- libgo \
+ libgomp \
+- libitm \
+ libquadmath \
+- libsanitizer/{a,l,ub}san \
+- libstdc++-v3/src \
+- libvtv; do
++ libstdc++-v3/src; do
+ make -C $CHOST/32/$lib DESTDIR="$pkgdir" install-toolexeclibLTLIBRARIES
+ done
+
+- make -C $CHOST/32/libobjc DESTDIR="$pkgdir" install-libs
+- make -C $CHOST/32/libmpx DESTDIR="$pkgdir" install
+- rm -f "$pkgdir/usr/lib32/libmpx.spec"
+-
+ # remove files provided by gcc-libs
+ rm -rf "$pkgdir"/usr/lib
+
diff --git a/src/stage2/patches/generic/glibc.patch b/src/stage2/patches/generic/glibc.patch
index 6be827b..6408bd9 100644
--- a/src/stage2/patches/generic/glibc.patch
+++ b/src/stage2/patches/generic/glibc.patch
@@ -1,6 +1,6 @@
diff -rupN a/PKGBUILD b/PKGBUILD
---- a/PKGBUILD 2018-05-19 20:29:56.917412596 +0200
-+++ b/PKGBUILD 2018-05-19 20:33:17.550747931 +0200
+--- a/PKGBUILD 2018-06-18 22:54:08.616694943 +0200
++++ b/PKGBUILD 2018-06-18 22:55:09.746695552 +0200
@@ -6,7 +6,8 @@
# NOTE: valgrind requires rebuilt with each major glibc version
@@ -27,15 +27,29 @@ diff -rupN a/PKGBUILD b/PKGBUILD
--enable-stack-protector=strong
--enable-stackguard-randomization
--enable-static-pie
-@@ -87,6 +89,8 @@ build() {
+@@ -87,9 +89,11 @@ build() {
echo "CXX += -D_FORTIFY_SOURCE=2" >> configparms
make
+ [ "x@MULTILIB@" == "xenable" ] || return 0
+
cd "$srcdir/lib32-glibc-build"
- export CC="gcc -m32 -mstackrealign"
- export CXX="g++ -m32 -mstackrealign"
+- export CC="gcc -m32 -mstackrealign"
+- export CXX="g++ -m32 -mstackrealign"
++ export CC="@CHOST@-gcc @PLATFORM32_CFLAGS@"
++ export CXX="@CHOST@-g++ @PLATFORM32_CFLAGS@"
+
+ echo "slibdir=/usr/lib32" >> configparms
+ echo "rtlddir=/usr/lib32" >> configparms
+@@ -102,7 +106,7 @@ build() {
+ CXXFLAGS=${CXXFLAGS/-fno-plt/}
+
+ "$srcdir/glibc/configure" \
+- --host=i686-pc-linux-gnu \
++ --host=@CHOST32@ \
+ --libdir=/usr/lib32 \
+ --libexecdir=/usr/lib32 \
+ ${_configure_flags[@]}
@@ -164,8 +168,8 @@ package_glibc() {
"$srcdir/glibc/localedata/SUPPORTED" >> "$pkgdir/etc/locale.gen"
diff --git a/src/stage2/patches/powerpc64le/binutils.patch b/src/stage2/patches/powerpc64le/binutils.patch
new file mode 100644
index 0000000..c8392a8
--- /dev/null
+++ b/src/stage2/patches/powerpc64le/binutils.patch
@@ -0,0 +1,27 @@
+diff -rupN a/PKGBUILD b/PKGBUILD
+--- a/PKGBUILD 2018-06-20 07:56:40.877881835 +0200
++++ b/PKGBUILD 2018-06-20 11:06:02.564661867 +0200
+@@ -51,6 +51,7 @@ build() {
+ cd binutils-build
+
+ "$srcdir/binutils-$pkgver/configure" \
++ --host=@CHOST@ --build=@BUILDHOST@ \
+ --prefix=/usr \
+ --with-lib-path=/usr/lib:/usr/local/lib \
+ --with-bugurl=https://bugs.archlinux.org/ \
+@@ -61,12 +62,13 @@ build() {
+ --enable-plugins \
+ --enable-relro \
+ --enable-shared \
+- --enable-targets=x86_64-pep \
++ --enable-targets=spu \
++ --enable-targets=powerpc-linux \
+ --enable-threads \
+ --disable-gdb \
+ --disable-werror \
+ --with-pic \
+- --with-system-zlib
++ --with-system-zlib=@SYSROOT@/usr/lib/libz.so
+
+ make configure-host
+ make tooldir=/usr