Skip to content

Conversation

@MingcongBai
Copy link
Member

This feature is supported by Binutils on amd64, arm64, loongarch64, and ppc64el.

@MingcongBai MingcongBai changed the title arch: enable packed relative relocation via DT_RELR Core 13 Oct 4, 2025
MingcongBai and others added 5 commits November 27, 2025 23:05
This feature is supported by Binutils on amd64, arm64, loongarch64,
and ppc64el.
-D_FORTIFY_SOURCE requires optimisation (-O) and may cause build failures
if a build system passes only CPPFLAGS but not C/CXXFLAGS (i.e., Binutils
and GCC, and we are not sure if this has caused further silent failures
elsewhere).

Since it would not do much harm to pass our lowest optimisation level on
its own, pass -O2 as part of the AB_FLAGS_FTF condition.
We choose to add NOPERMISSIVE instead of removing it completely, because
plenty of (old) C++ projects requires this to build using newer GCC
versions, such as ncurses (C++ bindings and implementation), and
libstdc++ on some architectures.
GCC 15 introduces a new compiler flag, `-m{,no-}fence-tso`, to control
the usage of `fence.tso` instruction (which is not supported on some old
T-Head cores, such as the ones used on TH1520/SG2042). When it's
disabled, more strong `fence rw,rw` is emitted and correctness is
then not affected.

Disable emitting this instruction now, because all buildbots of riscv64
are currently SG2042, and no CPU cores are known to benefit from
`fence.tso` yet.

Signed-off-by: Icenowy Zheng <uwu@icenowy.me>
This will be stored on a separated list and will be passed along with
__AB_SONAMES for manually specifying sonames for Spiral.

See core-devel/gcc/01-runtime/beyond for details.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants