[Bug 1896458] Re: newer gcc packages in toolchain ppa broke ubsan

Brian Murray 1896458 at bugs.launchpad.net
Fri Jul 26 16:08:42 UTC 2024


Ubuntu 20.10 (Groovy Gorilla) has reached end of life, so this bug will
not be fixed for that specific release.

** Changed in: gcc-9 (Ubuntu Groovy)
       Status: Fix Committed => Won't Fix

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to gcc-9 in Ubuntu.
https://bugs.launchpad.net/bugs/1896458

Title:
  newer gcc packages in toolchain ppa broke ubsan

Status in gcc-9 package in Ubuntu:
  Fix Released
Status in gcc-9 source package in Focal:
  Fix Released
Status in gcc-9 source package in Groovy:
  Won't Fix

Bug description:
  $ gcc -fsanitize=undefined /dev/null                                                                                                                                                          
  /usr/bin/ld: unrecognized option '--push-state--no-as-needed'                                                                                                                                 
  /usr/bin/ld: use the --help option for usage information                                                                                                                                      
  collect2: error: ld returned 1 exit status
  $ gcc-9 -fsanitize=undefined /dev/null                                                          
  /usr/bin/ld: unrecognized option '--push-state--no-as-needed'
  /usr/bin/ld: use the --help option for usage information
  collect2: error: ld returned 1 exit status
  $ gcc -static-libubsan -fsanitize=undefined /dev/null
  /dev/null: file not recognized: File truncated
  collect2: error: ld returned 1 exit status
  $ gcc --version
  gcc (Ubuntu 5.5.0-12ubuntu1~16.04) 5.5.0 20171010
  Copyright (C) 2015 Free Software Foundation, Inc.
  This is free software; see the source for copying conditions.  There is NO
  warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

  $ gcc-9 --version
  gcc-9 (Ubuntu 9.3.0-10ubuntu2~16.04) 9.3.0
  Copyright (C) 2019 Free Software Foundation, Inc.
  This is free software; see the source for copying conditions.  There is NO
  warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  ==========================
  the issue is caused by
  $ gcc -dumpspecs | grep push
  %{static|static-libgcc:-lgcc -lgcc_eh}%{!static:%{!static-libgcc:%{!shared-libgcc:-lgcc --push-state --as-needed -lgcc_s --pop-state}%{shared-libgcc:-lgcc_s%{!shared: -lgcc}}}}
  %{!fsyntax-only:%{!c:%{!M:%{!MM:%{!E:%{!S:    %(linker) %{!fno-use-linker-plugin:%{!fno-lto:     -plugin %(linker_plugin_file)     -plugin-opt=%(lto_wrapper)     -plugin-opt=-fresolution=%u.res     %{!nostdlib:%{!nodefaultlibs:%:pass-through-libs(%(link_gcc_c_sequence))}}     }}%{flto|flto=*:%<fcompare-debug*}     %{flto} %{fno-lto} %{flto=*} %l %{no-pie:} %{pie:-pie} %{fuse-ld=*:-fuse-ld=%*}  %{gz*:%e-gz is not supported in this configuration} -z relro %X %{o*} %{e*} %{N} %{n} %{r}    %{s} %{t} %{u*} %{z} %{Z} %{!nostdlib:%{!nostartfiles:%S}} %{!nostdlib:%{fvtable-verify=std: -lvtv -u_vtable_map_vars_start -u_vtable_map_vars_end}    %{fvtable-verify=preinit: -lvtv -u_vtable_map_vars_start -u_vtable_map_vars_end}}     %{static:} %{L*} %(mfwrap) %(link_libgcc) %{!nostdlib:%{!nodefaultlibs:%{%:sanitize(address):%{!shared:libasan_preinit%O%s} %{static-libasan:%{!shared:-Bstatic --whole-archive -lasan --no-whole-archive -Bdynamic}}%{!static-libasan:%{!fuse-ld=gold:--push-state} --no-as-needed -lasan %{fuse-ld=gold:--as-needed;:--pop-state}}}     %{%:sanitize(thread):%{static-libtsan:%{!shared:-Bstatic --whole-archive -ltsan --no-whole-archive -Bdynamic}}%{!static-libtsan:%{!fuse-ld=gold:--push-state} --no-as-needed -ltsan %{fuse-ld=gold:--as-needed;:--pop-state}}}     %{%:sanitize(leak):%{static-liblsan:%{!shared:-Bstatic --whole-archive -llsan --no-whole-archive -Bdynamic}}%{!static-liblsan:%{!fuse-ld=gold:--push-state} --no-as-needed -llsan %{fuse-ld=gold:--as-needed;:--pop-state}}}}} %o    %{!nostdlib:%{!nodefaultlibs:%{mmpx:%{fcheck-pointer-bounds:    %{static:--whole-archive -lmpx --no-whole-archive %:include(libmpx.spec)%(link_libmpx)}    %{!static:%{static-libmpx:-Bstatic --whole-archive}    %{!static-libmpx:--push-state --no-as-needed} -lmpx     %{!static-libmpx:--pop-state}     %{static-libmpx:--no-whole-archive -Bdynamic %:include(libmpx.spec)%(link_libmpx)}}}}%{mmpx:%{fcheck-pointer-bounds:%{!fno-chkp-use-wrappers:    %{static:-lmpxwrappers}    %{!static:%{static-libmpxwrappers:-Bstatic}    -lmpxwrappers %{static-libmpxwrappers: -Bdynamic}}}}}}} %{mmpx:%{fcheck-pointer-bounds:%{!static:%:include(libmpx.spec)%(link_mpx)}}}     %{fopenacc|fopenmp|ftree-parallelize-loops=*:%:include(libgomp.spec)%(link_gomp)}    %{fcilkplus:%:include(libcilkrts.spec)%(link_cilkrts)}    %{fgnu-tm:%:include(libitm.spec)%(link_itm)}    %(mflib)  %{fsplit-stack: --wrap=pthread_create}    %{fprofile-arcs|fprofile-generate*|coverage:-lgcov} %{!nostdlib:%{!nodefaultlibs:%{%:sanitize(address): %{static-libasan:%:include(libsanitizer.spec)%(link_libasan)}    %{static:%ecannot specify -static with -fsanitize=address}}    %{%:sanitize(thread): %{static-libtsan:%:include(libsanitizer.spec)%(link_libtsan)}    %{static:%ecannot specify -static with -fsanitize=thread}}    %{%:sanitize(undefined):%{static-libubsan:-Bstatic} %{!static-libubsan:%{!fuse-ld=gold:--push-state }--no-as-needed} -lubsan  %{static-libubsan:-Bdynamic} %{!static-libubsan:%{fuse-ld=gold:--as-needed;:--pop-state}} %{static-libubsan:%:include(libsanitizer.spec)%(link_libubsan)}}    %{%:sanitize(leak): %{static-liblsan:%:include(libsanitizer.spec)%(link_liblsan)}}}}     %{!nostdlib:%{!nodefaultlibs:%(link_ssp) %(link_gcc_c_sequence)}}    %{!nostdlib:%{!nostartfiles:%E}} %{T*} }}}}}}
  ================
  specifically by
  %{!static-libubsan:%{!fuse-ld=gold:--push-state }--no-as-needed}
  with space on wrong side of closing brace

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/gcc-9/+bug/1896458/+subscriptions




More information about the foundations-bugs mailing list