[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1054469: "Loong64: add --as-needed option for Debian-Loong64"



Package: gcc-13
Version: 13.2.0-5
Severity: normal
X-Debbugs-Cc: fanpeng@loongson.cn

Dear Maintainer,


Here we need to add "--as-needed" to GNU_USER_TARGET_LINK_SPEC, or it
will cause build error from some other packages.

-- System Information:
Debian Release: trixie/sid
  APT prefers unreleased
  APT policy: (500, 'unreleased'), (500, 'unstable')
Architecture: loong64 (loongarch64)

Kernel: Linux 5.10.0-60.96.0.126.oe2203.loongarch64 (SMP w/32 CPU threads)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=ANSI_X3.4-1968) (ignored: LC_ALL set to POSIX), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: unable to detect

Versions of packages gcc-13 depends on:
ii  binutils       2.41-6
ii  cpp-13         13.2.0-5
ii  gcc-13-base    13.2.0-5
ii  libc6          2.37-9+loong64
ii  libcc1-0       13.2.0-5
ii  libgcc-13-dev  13.2.0-5
ii  libgcc-s1      13.2.0-5
ii  libgmp10       2:6.3.0+dfsg-2
ii  libisl23       0.26-3
ii  libmpc3        1.3.1-1+b1
ii  libmpfr6       4.2.1-1
ii  libstdc++6     13.2.0-5
ii  libzstd1       1.5.5+dfsg2-2
ii  zlib1g         1:1.2.13.dfsg-3

Versions of packages gcc-13 recommends:
ii  libc6-dev  2.37-9+loong64

Versions of packages gcc-13 suggests:
pn  gcc-13-doc      <none>
pn  gcc-13-locales  <none>

-- no debconf information
diff --git a/src/gcc/config/loongarch/gnu-user.h b/src/gcc/config/loongarch/gnu-user.h
index aecaa02a1..c1669168e 100644
--- a/src/gcc/config/loongarch/gnu-user.h
+++ b/src/gcc/config/loongarch/gnu-user.h
@@ -40,6 +40,7 @@ along with GCC; see the file COPYING3.  If not see
 #undef GNU_USER_TARGET_LINK_SPEC
 #define GNU_USER_TARGET_LINK_SPEC \
   "%{G*} %{shared} -m " GNU_USER_LINK_EMULATION \
+  " %{!fsanitize=*:--as-needed} " \
   "%{!shared: %{static} " \
   "%{!static: %{!static-pie: %{rdynamic:-export-dynamic} " \
   "-dynamic-linker " GNU_USER_DYNAMIC_LINKER "}} " \

Reply to: