Skip to content

Commit

Permalink
cgct/cgt: update to 14.2.0 (#298)
Browse files Browse the repository at this point in the history
  • Loading branch information
Maxython authored Oct 15, 2024
1 parent 21ce4cc commit 2530611
Show file tree
Hide file tree
Showing 5 changed files with 55 additions and 55 deletions.
46 changes: 23 additions & 23 deletions cgct/cgt/PKGBUILD
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
pkgname=cgt
pkgver=14.1.0
pkgrel=2
pkgver=14.2.0
pkgrel=0
pkgdesc='Cross GCCs for Termux (only for Linux)'
arch=(x86_64)
url='https://gcc.gnu.org/'
Expand All @@ -12,16 +12,18 @@ source=(https://ftp.gnu.org/gnu/gcc/gcc-$pkgver/gcc-$pkgver.tar.xz
set_dynamic_path.patch
cgct-app-prefix.cc
cgct-app-prefix.h)
sha256sums=('e283c654987afe3de9d8080bc0bd79534b5ca0d681a73a11ff2b5d3767426840'
'89529c2ad7b8f25a1a1a7b4129b8a58d3b80e254026d85800bb20f60431a5a03'
'fb1a2b9d2eb649153431e7bc81d4382c667338b9c461e4e4697d7db754041b68'
'fc725f6e77dedc0e6cd3d55ef33e93f0b7c5b25b6d5cf1d42311357f6abf1047'
'4d61bcbbfa41ac6093d8f3b7c1c4007456172a18a0fafb1743871baf7863469e'
sha256sums=('a7b39bc69cbf9e25826c5a60ab26477001f7c08d85cec04bc0e29cabed6f3cc9'
'f4962b9ab48271994fefbd7c654fd2d60356a39abecc3510cfe45d1be7f50483'
'805fa7799fe23f2e4b1d5f9d10fadf46a45f446c6462f32f3b7633b8941003f3'
'ba65de3512c3d02030c5e3bcd70b69a7922eec6bdc24763bf4a6045447dc1d84'
'e402f2bc3288158e8edbef27b511015d87f37ba70ddbd84c2b925fe075822f95'
'732e15a76056348911f60825c377c0378f6dad57b29eb86fcc7447cf8172f171'
'9fb91df134d096bf493844812617b5aed9ce5d6ccd564f8a3a11c8d9812be744')
depends=('cbt')
optdepends=('glibc-cgct')
groups=('cgct')
targets=(aarch64-linux-gnu arm-linux-gnueabihf x86_64-linux-gnu i686-linux-gnu)
options=(libtool staticlibs !emptydirs)

prepare() {
for i in *.patch; do
Expand All @@ -34,6 +36,12 @@ prepare() {
sed -i 's@\./fixinc\.sh@-c true@' gcc/Makefile.in
sed -i '/m64=/s/lib64/lib/' gcc/config/i386/t-linux64
sed -i '/lp64=/s/lib64/lib/' gcc/config/aarch64/t-aarch64-linux
for i in "'\${exec_prefix}'/\${target_noncanonical}" \
'${exec_prefix}/'{'${host_alias}','${target_noncanonical}'} \
'$(exec_prefix)/'{'$(host_noncanonical)','$(target_noncanonical)','$(target_alias)'} \
'${prefix}/${target_alias}'; do
sed -i "s|${i}|${i%%/*}|" $(grep -s -r -l "${i}")
done
}

build() {
Expand All @@ -43,7 +51,7 @@ build() {

clean_prefix || true

for target in aarch64-linux-gnu arm-linux-gnueabihf x86_64-linux-gnu i686-linux-gnu; do
for target in ${targets[@]}; do
arch_build=${target/-*}
CGCT_PREFIX=${CGCT_PATH}/${arch_build}
mkdir gcc-${arch_build} || true
Expand Down Expand Up @@ -90,6 +98,7 @@ build() {
--with-linker-hash-style=gnu \
--enable-gnu-indirect-function \
--enable-gnu-unique-object \
--enable-libstdcxx-backtrace \
--enable-shared \
--disable-werror \
--disable-libssp \
Expand Down Expand Up @@ -119,7 +128,9 @@ build() {
}

package() {
for target in aarch64-linux-gnu arm-linux-gnueabihf x86_64-linux-gnu i686-linux-gnu; do
clean_prefix || true

for target in ${targets[@]}; do
arch_build=${target/-*}
CGCT_PREFIX=${CGCT_PATH}/${arch_build}
cd gcc-${arch_build}
Expand All @@ -128,26 +139,15 @@ package() {
install_gpkg ${arch_build} ${pkg}
done

make DESTDIR="$pkgdir" install-gcc install-target-{libgcc,libstdc++-v3,libgomp,libquadmath,libatomic}

if [ -d $pkgdir/${CGCT_PREFIX}/$target/lib ]; then
mv $pkgdir/${CGCT_PREFIX}/$target/lib/* $pkgdir/${CGCT_PREFIX}/lib
fi
if [ -d $pkgdir/${CGCT_PREFIX}/$target/include ]; then
mv $pkgdir/${CGCT_PREFIX}/$target/include/* $pkgdir/${CGCT_PREFIX}/include
fi
if [ -d $pkgdir/${CGCT_PREFIX}/include/$pkgver ]; then
mkdir $pkgdir/${CGCT_PREFIX}/include/c++
mv $pkgdir/${CGCT_PREFIX}/include/$pkgver $pkgdir/${CGCT_PREFIX}/include/c++
fi
make DESTDIR="$pkgdir" install-gcc \
install-target-{libgcc,libstdc++-v3,libgomp,libquadmath,libatomic,libitm,libsanitizer,libvtv}

for i in gcc g++; do
ln -s ${target}-${i} $pkgdir/${CGCT_PREFIX}/bin/${i}
done
ln -s gcc $pkgdir/${CGCT_PREFIX}/bin/cc
ln -s g++ $pkgdir/${CGCT_PREFIX}/bin/cpp
rm -fr $pkgdir/${CGCT_PREFIX}/share
rm -fr $pkgdir/${CGCT_PREFIX}/$target
rm -fr $pkgdir/${DIR_TERMUX}/files

clean_prefix

Expand Down
4 changes: 2 additions & 2 deletions cgct/cgt/config.sub.patch
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--- src/gcc-14.1.0/config.sub 2024-04-17 12:59:33.770464867 +0300
+++ src/gcc-14.1.0/config.sub.patch 2024-04-17 13:10:53.190464608 +0300
--- src/gcc-14.2.0/config.sub 2024-04-17 12:59:33.770464867 +0300
+++ src/gcc-14.2.0/config.sub.patch 2024-04-17 13:10:53.190464608 +0300
@@ -647,6 +647,10 @@
basic_machine=ymp-cray
basic_os=unicos
Expand Down
4 changes: 2 additions & 2 deletions cgct/cgt/configure.patch
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--- src/gcc-14.1.0/configure 2023-07-27 11:13:03.000000000 +0300
+++ src/gcc-14.1.0/configure.patch 2024-04-17 19:47:43.249004152 +0300
--- src/gcc-14.2.0/configure 2023-07-27 11:13:03.000000000 +0300
+++ src/gcc-14.2.0/configure.patch 2024-04-17 19:47:43.249004152 +0300
@@ -17498,7 +17498,7 @@

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the target ar" >&5
Expand Down
4 changes: 2 additions & 2 deletions cgct/cgt/gcc-configure.patch
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--- src/gcc-14.1.0/gcc/configure 2024-05-20 09:02:31.592159861 +0300
+++ src/gcc-14.1.0/gcc/configure.patch 2024-05-20 09:04:22.992159819 +0300
--- src/gcc-14.2.0/gcc/configure 2024-05-20 09:02:31.592159861 +0300
+++ src/gcc-14.2.0/gcc/configure.patch 2024-05-20 09:04:22.992159819 +0300
@@ -3784,9 +3784,6 @@
gcc_gxx_include_dir='${libsubdir}/include/c++'
else
Expand Down
52 changes: 26 additions & 26 deletions cgct/cgt/set_dynamic_path.patch
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--- src/gcc-14.1.0/gcc/Makefile.in
+++ src/gcc-14.1.0/gcc/Makefile.in
--- src/gcc-14.2.0/gcc/Makefile.in
+++ src/gcc-14.2.0/gcc/Makefile.in
@@ -559,13 +559,9 @@ FNMATCH_H = $(srcdir)/../include/fnmatch.h
LINKER_PLUGIN_API_H = $(srcdir)/../include/plugin-api.h

Expand Down Expand Up @@ -72,8 +72,8 @@
$(mkinstalldirs) $${include_dir}; \
chmod a+rx $${include_dir} || true; \
$(SHELL) $(srcdir)/../move-if-change \
--- src/gcc-14.1.0/gcc/collect2.cc
+++ src/gcc-14.1.0/gcc/collect2.cc
--- src/gcc-14.2.0/gcc/collect2.cc
+++ src/gcc-14.2.0/gcc/collect2.cc
@@ -32,6 +32,7 @@ along with GCC; see the file COPYING3. If not see
#include "file-find.h"
#include "simple-object.h"
Expand Down Expand Up @@ -130,8 +130,8 @@
NULL
};

--- src/gcc-14.1.0/gcc/config/aarch64/aarch64-linux.h
+++ src/gcc-14.1.0/gcc/config/aarch64/aarch64-linux.h
--- src/gcc-14.2.0/gcc/config/aarch64/aarch64-linux.h
+++ src/gcc-14.2.0/gcc/config/aarch64/aarch64-linux.h
@@ -21,7 +21,9 @@
#ifndef GCC_AARCH64_LINUX_H
#define GCC_AARCH64_LINUX_H
Expand Down Expand Up @@ -168,8 +168,8 @@

#define GNU_USER_TARGET_MATHFILE_SPEC \
"%{Ofast|ffast-math|funsafe-math-optimizations:%{!shared:crtfastmath.o%s}}"
--- src/gcc-14.1.0/gcc/config/arm/linux-eabi.h
+++ src/gcc-14.1.0/gcc/config/arm/linux-eabi.h
--- src/gcc-14.2.0/gcc/config/arm/linux-eabi.h
+++ src/gcc-14.2.0/gcc/config/arm/linux-eabi.h
@@ -18,6 +18,8 @@
along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
Expand Down Expand Up @@ -223,8 +223,8 @@

/* Use the default LIBGCC_SPEC, not the version in linux-elf.h, as we
do not use -lfloat. */
--- src/gcc-14.1.0/gcc/config/arm/linux-elf.h
+++ src/gcc-14.1.0/gcc/config/arm/linux-elf.h
--- src/gcc-14.2.0/gcc/config/arm/linux-elf.h
+++ src/gcc-14.2.0/gcc/config/arm/linux-elf.h
@@ -62,16 +62,16 @@

#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
Expand All @@ -246,8 +246,8 @@

#undef LINK_SPEC
#define LINK_SPEC LINUX_TARGET_LINK_SPEC
--- src/gcc-14.1.0/gcc/config/i386/gnu-user64.h
+++ src/gcc-14.1.0/gcc/config/i386/gnu-user64.h
--- src/gcc-14.2.0/gcc/config/i386/gnu-user64.h
+++ src/gcc-14.2.0/gcc/config/i386/gnu-user64.h
@@ -52,19 +52,19 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
%{" SPEC_X32 ":--x32} \
%{msse2avx:%{!mavx:-msse2avx}}"
Expand Down Expand Up @@ -276,8 +276,8 @@

#undef LINK_SPEC
#define LINK_SPEC GNU_USER_TARGET_LINK_SPEC
--- src/gcc-14.1.0/gcc/config/i386/linux-common.h
+++ src/gcc-14.1.0/gcc/config/i386/linux-common.h
--- src/gcc-14.2.0/gcc/config/i386/linux-common.h
+++ src/gcc-14.2.0/gcc/config/i386/linux-common.h
@@ -35,7 +35,7 @@ along with GCC; see the file COPYING3. If not see
#undef LINK_SPEC
#define LINK_SPEC \
Expand All @@ -287,8 +287,8 @@

#undef LIB_SPEC
#define LIB_SPEC \
--- src/gcc-14.1.0/gcc/config/i386/linux.h
+++ src/gcc-14.1.0/gcc/config/i386/linux.h
--- src/gcc-14.2.0/gcc/config/i386/linux.h
+++ src/gcc-14.2.0/gcc/config/i386/linux.h
@@ -19,8 +19,11 @@ You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
Expand All @@ -302,8 +302,8 @@

#undef MUSL_DYNAMIC_LINKER
#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-i386.so.1"
--- src/gcc-14.1.0/gcc/config/i386/linux64.h
+++ src/gcc-14.1.0/gcc/config/i386/linux64.h
--- src/gcc-14.2.0/gcc/config/i386/linux64.h
+++ src/gcc-14.2.0/gcc/config/i386/linux64.h
@@ -23,13 +23,15 @@ a copy of the GCC Runtime Library Exception along with this program;
see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
<http://www.gnu.org/licenses/>. */
Expand All @@ -323,8 +323,8 @@

#undef MUSL_DYNAMIC_LINKER32
#define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-i386.so.1"
--- src/gcc-14.1.0/gcc/config/linux-android.h
+++ src/gcc-14.1.0/gcc/config/linux-android.h
--- src/gcc-14.2.0/gcc/config/linux-android.h
+++ src/gcc-14.2.0/gcc/config/linux-android.h
@@ -35,7 +35,7 @@
"%{" NOANDROID "|tno-android-cc:" LINUX_SPEC ";:" ANDROID_SPEC "}"

Expand All @@ -334,8 +334,8 @@

#define ANDROID_LINK_SPEC \
"%{shared: -Bsymbolic}"
--- src/gcc-14.1.0/gcc/config/linux.h
+++ src/gcc-14.1.0/gcc/config/linux.h
--- src/gcc-14.2.0/gcc/config/linux.h
+++ src/gcc-14.2.0/gcc/config/linux.h
@@ -27,6 +27,8 @@ a copy of the GCC Runtime Library Exception along with this program;
see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
<http://www.gnu.org/licenses/>. */
Expand Down Expand Up @@ -385,8 +385,8 @@
# undef INCLUDE_DEFAULTS_MUSL_CROSS
# define INCLUDE_DEFAULTS_MUSL_CROSS
#endif
--- src/gcc-14.1.0/gcc/cppdefault.cc
+++ src/gcc-14.1.0/gcc/cppdefault.cc
--- src/gcc-14.2.0/gcc/cppdefault.cc
+++ src/gcc-14.2.0/gcc/cppdefault.cc
@@ -23,15 +23,13 @@
#include "coretypes.h"
#include "tm.h"
Expand Down Expand Up @@ -425,8 +425,8 @@
#endif
{ 0, 0, 0, 0, 0, 0 }
};
--- src/gcc-14.1.0/gcc/gcc.cc
+++ src/gcc-14.1.0/gcc/gcc.cc
--- src/gcc-14.2.0/gcc/gcc.cc
+++ src/gcc-14.2.0/gcc/gcc.cc
@@ -47,6 +47,7 @@ compilation is specified by a string called a "spec". */
#include "opts-jobserver.h"
#include "common/common-target.h"
Expand Down

0 comments on commit 2530611

Please sign in to comment.