Skip to content
This repository was archived by the owner on May 7, 2024. It is now read-only.

Commit 49eca10

Browse files
committed
meta: multiple refinments
- etc/autobuild/ab3_defcfg.sh: add comment to marking its reference - arch/(multiple arches): disable PIE for other retro architectures
1 parent a5ea666 commit 49eca10

File tree

5 files changed

+17
-1
lines changed

5 files changed

+17
-1
lines changed

arch/loongarch64.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,7 @@
33
##@copyright GPL-2.0+
44

55
CFLAGS_GCC_ARCH='-mabi=lp64 -march=loongarch64 -mtune=loongarch64'
6+
7+
# Position-independent executable buildmode is not available on loong64 architecture.
8+
# Removing for loongarch64 target.
9+
GOFLAGS=${GOFLGAS/-buildmode=pie/}

arch/loongson2f.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,7 @@ CFLAGS_GCC_ARCH='-mloongson-mmi -Wa,-mfix-loongson2f-nop '
1111

1212
CFLAGS_GCC_OPTI_LTO="${CFLAGS_COMMON_OPTI_LTO} -flto-partition=none "
1313
LDFLAGS_GCC_OPTI_LTO="${LDFLAGS_COMMON_OPTI_LTO} -mxgot -flto-partition=none "
14+
15+
# Position-independent executable buildmode is not available on any mips architecture.
16+
# Removing for loongson2f target.
17+
GOFLAGS=${GOFLGAS/-buildmode=pie/}

arch/powerpc.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,7 @@ CFLAGS_COMMON_OPTI='-Os '
88
CFLAGS_GCC_OPTI='-fira-loop-pressure -fira-hoist-pressure '
99

1010
CFLAGS_COMMON_ARCH=' -m32 -mcpu=G3 -mtune=G4 -mno-altivec -msecure-plt -mhard-float '
11+
12+
# Position-independent executable buildmode is not available on PowerPC 32-bit architecture.
13+
# Removing for powerpc target.
14+
GOFLAGS=${GOFLGAS/-buildmode=pie/}

arch/ppc64.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,7 @@ LDFLAGS_GCC_OPTI_LTO="${LDFLAGS_COMMON_OPTI_LTO} -flto-partition=none "
1212

1313
# LLD does not support POWER ABI v1.
1414
RUSTFLAGS_COMMON_OPTI_LTO='-Clink-arg=-fuse-ld=bfd -Clink-arg=-Wl,-build-id=sha1'
15+
16+
# Position-independent executable buildmode is not available on PowerPC 64-bit
17+
# (Big Endian) architecture. Removing for ppc64 target.
18+
GOFLAGS=${GOFLGAS/-buildmode=pie/}

etc/autobuild/ab3_defcfg.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ RECONF=yes
145145
ABQA=yes
146146
ABINSTALL="dpkg"
147147

148-
# Golang default build flags
148+
# Golang default build flags | Adapted from Arch Linux's Go package guildline.
149149
GOFLAGS+=" -mod=readonly" # Ensure module files are not updated during building process.
150150
GOFLAGS+=" -trimpath" # Required for eproducible build.
151151
GOFLAGS+=" -modcacherw" # Ensures that go modules creates a write-able path.

0 commit comments

Comments
 (0)