Skip to content

Commit d1dc021

Browse files
committed
fix: use -mlong-double-64 for ppc64el
1 parent 8a2f74d commit d1dc021

File tree

1 file changed

+17
-4
lines changed

1 file changed

+17
-4
lines changed

snap/snapcraft.yaml

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,11 +78,25 @@ parts:
7878
source-depth: 1
7979
plugin: nil
8080
build-packages:
81-
- musl-dev
81+
- musl-tools
8282
override-build: |
8383
set -ex
8484
8585
MACHINE_TYPE="$(gcc -dumpmachine | awk -F'-' '{print $1}')"
86+
if [ "${MACHINE_TYPE}" = "powerpc64le" ]; then
87+
cat <<EOM | tee -a "/usr/lib/powerpc64le-linux-musl/musl-gcc.specs"
88+
%rename cpp_options x_cpp_options
89+
90+
*cpp_options:
91+
-mlong-double-64 %(x_cpp_options)
92+
93+
%rename cc1 x_cc1
94+
95+
*cc1:
96+
-mlong-double-64 %(x_cc1)
97+
98+
EOM
99+
fi
86100
ln -s $(pwd)/include/sys/queue.h /usr/include/${MACHINE_TYPE}-linux-musl/sys/queue.h || true
87101
ln -s /usr/include/${MACHINE_TYPE}-linux-gnu/asm /usr/include/${MACHINE_TYPE}-linux-musl/asm || true
88102
ln -s /usr/include/asm-generic /usr/include/${MACHINE_TYPE}-linux-musl/asm-generic || true
@@ -116,8 +130,8 @@ parts:
116130
libnsl:
117131
after:
118132
- libtirpc
119-
source: https://git.launchpad.net/ubuntu/+source/libnsl
120-
source-branch: applied/ubuntu/noble
133+
source: https://github.com/thkukuk/libnsl.git
134+
source-tag: v2.0.0
121135
source-type: git
122136
source-depth: 1
123137
plugin: nil
@@ -220,7 +234,6 @@ parts:
220234
- autopoint
221235
- gettext
222236
- libtool
223-
- libsqlite3-dev
224237
- make
225238
- pkg-config
226239
- tcl

0 commit comments

Comments
 (0)