Skip to content

Commit 33772ec

Browse files
committed
Add GCC15 for pablito
Signed-off-by: falkTX <falktx@falktx.com>
1 parent ff893aa commit 33772ec

9 files changed

Lines changed: 2490 additions & 2 deletions

File tree

.common

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,12 @@ else
6161
fi
6262

6363
#######################################################################################################################
64-
# check for generic builds
64+
# check for custom and generic builds
6565

66-
if [[ "${PLATFORM}" == "generic-aarch64-"* ]] || [[ "${PLATFORM}" = "darkglass-anagram"* ]]; then
66+
if [[ "${PLATFORM}" = "darkglass-anagram-gcc15"* ]]; then
67+
TOOLCHAIN_PLATFORM="darkglass-anagram-gcc15"
68+
BR2_PLATFORM="${PLATFORM}"
69+
elif [[ "${PLATFORM}" == "generic-aarch64-"* ]] || [[ "${PLATFORM}" = "darkglass-anagram"* ]]; then
6770
TOOLCHAIN_PLATFORM="generic-aarch64"
6871
BR2_PLATFORM="${PLATFORM}"
6972
fi
@@ -112,6 +115,11 @@ case "${TOOLCHAIN_PLATFORM}" in
112115
BUILDROOT_VERSION=buildroot-2023.11.3
113116
CT_NG_VERSION=crosstool-ng-1.25.0
114117
;;
118+
# custom darkglass-anagram-gcc15 target: ct-ng 1.28 with gcc 15 + glibc 2.34
119+
"darkglass-anagram-gcc15")
120+
BUILDROOT_VERSION=buildroot-2023.11.3
121+
CT_NG_VERSION=crosstool-ng-1.28.0
122+
;;
115123
# fallback
116124
*)
117125
BUILDROOT_TAR_EXT=bz2

bootstrap.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,10 @@ if [ ! -f ${TOOLCHAIN_BUILD_DIR}/${CT_NG_VERSION}/configure ]; then
7373
cp ${SOURCE_DIR}/patches/${CT_NG_VERSION}/glibc-2.27-dwarf/*.patch ${TOOLCHAIN_BUILD_DIR}/${CT_NG_VERSION}/packages/glibc/2.27/
7474
fi
7575
;;
76+
77+
"crosstool-ng-1.28.0")
78+
cp ${SOURCE_DIR}/patches/${CT_NG_VERSION}/glibc-2.34/*.patch ${TOOLCHAIN_BUILD_DIR}/${CT_NG_VERSION}/packages/glibc/2.34/
79+
;;
7680
esac
7781
fi
7882

@@ -170,6 +174,7 @@ if [ ! -d ${BUILD_DIR}/${BUILDROOT_VERSION} ]; then
170174
;;
171175

172176
"buildroot-2023.11.3")
177+
patch -d ${BUILD_DIR}/${BUILDROOT_VERSION} -p1 -i ${SOURCE_DIR}/patches/${BUILDROOT_VERSION}/001_gcc-15.patch
173178
;;
174179
esac
175180
fi
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
diff --git a/toolchain/Config.in b/toolchain/Config.in
2+
index 34e0ae2..7f3a73b 100644
3+
--- a/toolchain/Config.in
4+
+++ b/toolchain/Config.in
5+
@@ -263,6 +263,7 @@ config BR2_TOOLCHAIN_HAS_GCC_BUG_110934
6+
config BR2_TOOLCHAIN_HAS_GCC_BUG_111001
7+
bool
8+
default y if BR2_sh
9+
+ default y if !BR2_TOOLCHAIN_GCC_AT_LEAST_14
10+
depends on BR2_TOOLCHAIN_GCC_AT_LEAST_13
11+
depends on BR2_OPTIMIZE_1 || \
12+
BR2_OPTIMIZE_2 || \
13+
@@ -790,10 +791,20 @@ config BR2_TOOLCHAIN_GCC_AT_LEAST_13
14+
bool
15+
select BR2_TOOLCHAIN_GCC_AT_LEAST_12
16+
17+
+config BR2_TOOLCHAIN_GCC_AT_LEAST_14
18+
+ bool
19+
+ select BR2_TOOLCHAIN_GCC_AT_LEAST_13
20+
+
21+
+config BR2_TOOLCHAIN_GCC_AT_LEAST_15
22+
+ bool
23+
+ select BR2_TOOLCHAIN_GCC_AT_LEAST_14
24+
+
25+
# This order guarantees that the highest version is set, as kconfig
26+
# stops affecting a value on the first matching default.
27+
config BR2_TOOLCHAIN_GCC_AT_LEAST
28+
string
29+
+ default "15" if BR2_TOOLCHAIN_GCC_AT_LEAST_15
30+
+ default "14" if BR2_TOOLCHAIN_GCC_AT_LEAST_14
31+
default "13" if BR2_TOOLCHAIN_GCC_AT_LEAST_13
32+
default "12" if BR2_TOOLCHAIN_GCC_AT_LEAST_12
33+
default "11" if BR2_TOOLCHAIN_GCC_AT_LEAST_11
34+
diff --git a/toolchain/toolchain-external/toolchain-external-custom/Config.in.options b/toolchain/toolchain-external/toolchain-external-custom/Config.in.options
35+
index 5554d56..2e75305 100644
36+
--- a/toolchain/toolchain-external/toolchain-external-custom/Config.in.options
37+
+++ b/toolchain/toolchain-external/toolchain-external-custom/Config.in.options
38+
@@ -46,6 +46,14 @@ choice
39+
Set to the gcc version that is used by your external
40+
toolchain.
41+
42+
+config BR2_TOOLCHAIN_EXTERNAL_GCC_15
43+
+ bool "15.x"
44+
+ select BR2_TOOLCHAIN_GCC_AT_LEAST_15
45+
+
46+
+config BR2_TOOLCHAIN_EXTERNAL_GCC_14
47+
+ bool "14.x"
48+
+ select BR2_TOOLCHAIN_GCC_AT_LEAST_14
49+
+
50+
config BR2_TOOLCHAIN_EXTERNAL_GCC_13
51+
bool "13.x"
52+
select BR2_TOOLCHAIN_GCC_AT_LEAST_13
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
diff --git a/test/pdiff/pdiff.h b/test/pdiff/pdiff.h
2+
index 30fec06..715711c 100644
3+
--- a/test/pdiff/pdiff.h
4+
+++ b/test/pdiff/pdiff.h
5+
@@ -19,13 +19,7 @@
6+
7+
#include <cairo.h>
8+
9+
-typedef int bool;
10+
-#ifndef true
11+
-#define true 1
12+
-#endif
13+
-#ifndef false
14+
-#define false 0
15+
-#endif
16+
+#include <stdbool.h>
17+
18+
/* Image comparison metric using Yee's method (and a cairo interface)
19+
* References: A Perceptual Metric for Production Testing, Hector Yee, Journal of Graphics Tools 2004
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
diff --git a/src/ALAC/alac_decoder.c b/src/ALAC/alac_decoder.c
2+
index 46d3330..ecc9e6c 100644
3+
--- a/src/ALAC/alac_decoder.c
4+
+++ b/src/ALAC/alac_decoder.c
5+
@@ -23,6 +23,7 @@
6+
File: ALACDecoder.cpp
7+
*/
8+
9+
+#include <stdbool.h>
10+
#include <stdio.h>
11+
#include <stdlib.h>
12+
#include <stddef.h>
13+
@@ -38,11 +39,6 @@
14+
#include "ALACBitUtilities.h"
15+
#include "EndianPortable.h"
16+
17+
-typedef enum
18+
-{ false = 0,
19+
- true = 1
20+
-} bool ;
21+
-
22+
// constants/data
23+
const uint32_t kMaxBitDepth = 32 ; // max allowed bit depth is 32
24+
25+
diff --git a/src/ALAC/alac_encoder.c b/src/ALAC/alac_encoder.c
26+
index 599399a..bbe49e7 100644
27+
--- a/src/ALAC/alac_encoder.c
28+
+++ b/src/ALAC/alac_encoder.c
29+
@@ -28,6 +28,7 @@
30+
#define DebugMsg printf
31+
32+
// headers
33+
+#include <stdbool.h>
34+
#include <stdio.h>
35+
#include <stdlib.h>
36+
#include <string.h>
37+
@@ -44,12 +45,6 @@
38+
#include "ALACAudioTypes.h"
39+
#include "EndianPortable.h"
40+
41+
-typedef enum
42+
-{
43+
- false = 0,
44+
- true = 1
45+
-} bool ;
46+
-
47+
static void GetConfig (ALAC_ENCODER *p, ALACSpecificConfig * config) ;
48+
49+
static int32_t EncodeStereo (ALAC_ENCODER *p, struct BitBuffer * bitstream, const int32_t * input, uint32_t stride, uint32_t channelIndex, uint32_t numSamples) ;

0 commit comments

Comments
 (0)