Re: FYI: Unable to build -r501994 ports' devel/llvm60 on clang 8 based powerpc64 system: "BFD (GNU Binutils) 2.32 assertion fail elflink.c:2935"

2019-05-19 Thread Mark Millard via freebsd-toolchain
[I finally provide a small source file and steps for
processing it to produce the BFD_ASSERT notices.]

On 2019-May-19, at 11:06, Dimitry Andric  wrote:

> On 19 May 2019, at 16:56, Mark Millard via freebsd-toolchain 
>  wrote:
>> This was in a poudriere bulk build on a head -r347549 based powerpc64
>> system with system clang 8 for cc and c++ and base/binutils
>> for the likes of ld. (The system has the llvm libunwind patches
>> for powerpc64 so throwing c++ exceptions work.)
>> 
>> [4397/4552] : && /usr/bin/c++ -fPIC -O2 -pipe -DNDEBUG 
>> -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing  
>> -DNDEBUG -isystem /usr/local/include -fPIC -fvisibility-inlines-hidden 
>> -Werror=date-time -Werror=unguarded-availability-new -std=c++11 -Wall -W 
>> -Wno-unused-parameter -Wwrite-strings -Wcast-qual 
>> -Wmissing-field-initializers -pedantic -Wno-long-long 
>> -Wcovered-switch-default -Wnon-virtual-dtor -Wdelete-non-virtual-dtor 
>> -Wstring-conversion -fcolor-diagnostics -ffunction-sections -fdata-sections 
>> -O2 -pipe -DNDEBUG -fstack-protector-strong -isystem /usr/local/include 
>> -fno-strict-aliasing  -DNDEBUG -isystem /usr/local/include  
>> -fstack-protector-strong   -Wl,-z,origin  -Wl,-O3 -Wl,--gc-sections  
>> -Wl,--version-script,/wrkdirs/usr/ports/devel/llvm60/work/.build/tools/lto/LTO.exports
>>  -shared -Wl,-soname,libLTO.so.6 -o lib/libLTO.so.6.0.1 
>> tools/lto/CMakeFiles/LTO.dir/LTODisassembler.cpp.o 
>> tools/lto/CMakeFiles/LTO.dir/lto.cpp.o -L/usr/local/lib -Wl,-rpath,"\$ORIGIN/
 ../
>> lib:/usr/local/lib" lib/libLLVM-6.0.so && :
>> FAILED: lib/libLTO.so.6.0.1
>> : && /usr/bin/c++ -fPIC -O2 -pipe -DNDEBUG -fstack-protector-strong -isystem 
>> /usr/local/include -fno-strict-aliasing  -DNDEBUG -isystem 
>> /usr/local/include -fPIC -fvisibility-inlines-hidden -Werror=date-time 
>> -Werror=unguarded-availability-new -std=c++11 -Wall -W -Wno-unused-parameter 
>> -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic 
>> -Wno-long-long -Wcovered-switch-default -Wnon-virtual-dtor 
>> -Wdelete-non-virtual-dtor -Wstring-conversion -fcolor-diagnostics 
>> -ffunction-sections -fdata-sections -O2 -pipe -DNDEBUG 
>> -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing  
>> -DNDEBUG -isystem /usr/local/include  -fstack-protector-strong   
>> -Wl,-z,origin  -Wl,-O3 -Wl,--gc-sections  
>> -Wl,--version-script,/wrkdirs/usr/ports/devel/llvm60/work/.build/tools/lto/LTO.exports
>>  -shared -Wl,-soname,libLTO.so.6 -o lib/libLTO.so.6.0.1 
>> tools/lto/CMakeFiles/LTO.dir/LTODisassembler.cpp.o 
>> tools/lto/CMakeFiles/LTO.dir/lto.cpp.o -L/usr/local/lib 
>> -Wl,-rpath,"\$ORIGIN/../lib:/usr/
 loc
>> al/lib" lib/libLLVM-6.0.so && :
>> /usr/bin/powerpc64-unknown-freebsd13.0-ld: BFD (GNU Binutils) 2.32 assertion 
>> fail elflink.c:2935
>> /usr/bin/powerpc64-unknown-freebsd13.0-ld: BFD (GNU Binutils) 2.32 assertion 
>> fail elflink.c:2935
> 
> See .  I think this is a BFD ld bug,
> but I still haven't been able to come up with a small test case.  Any
> help appreciated. :-)

NOTE: Only tested in the powerpc64 context, with system clang 8
for c++ and base/binutil for ld and such.

I used the simple_version_script.map from llvm60 in my environment.

(Also noted in bugzilla comment #13:)

The following small source code file and the few steps
to build/link it produce the message:

# more small_link_failure.cpp
unsigned long fixed_seed_override= 0xdeadc0de;

inline unsigned long get_execution_seed()
{
  const  unsigned long seed_prime = 0xff51afd7ed558ccdULL;
  static unsigned long seed = fixed_seed_override ? fixed_seed_override
   : (unsigned long)seed_prime;
  return seed;
}

unsigned long f()
{
  return get_execution_seed();
}

# c++ -c small_link_failure.cpp

# rm -f small_link_failure.a
# /usr/bin/ar qc small_link_failure.a small_link_failure.o

# "/usr/bin/powerpc64-unknown-freebsd13.0-ld" \
"-Bshareable" \
"-o" "small_link_failure-1.0.so" \
"/usr/lib/crtbeginS.o" \
"--version-script" 
"/wrkdirs/usr/ports/devel/llvm60/work/.build/./lib/tools/llvm-shlib/simple_version_script.map"
 \
"--whole-archive" \
"small_link_failure.a" \
"--no-whole-archive" \
"-lm"

# /usr/bin/powerpc64-unknown-freebsd13.0-ld \
"-Bshareable" \
"-o" "small_link_failure.so.1.0.1" \
"small_link_failure-1.0.so"

The resultant output is:

/usr/bin/powerpc64-unknown-freebsd13.0-ld: BFD (GNU Binutils) 2.32 assertion 
fail elflink.c:2935
/usr/bin/powerpc64-unknown-freebsd13.0-ld: BFD (GNU Binutils) 2.32 assertion 
fail elflink.c:2935



===
Mark Millard
marklmi at yahoo.com
( dsl-only.net went
away in early 2018-Mar)

___
freebsd-toolchain@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-toolchain
To unsubscribe, send any mail to "freebsd-toolchain-unsubscr...@freebsd.org"


Re: FYI: Unable to build -r501994 ports' devel/llvm60 on clang 8 based powerpc64 system: "BFD (GNU Binutils) 2.32 assertion fail elflink.c:2935"

2019-05-19 Thread Mark Millard via freebsd-toolchain



On 2019-May-19, at 11:06, Dimitry Andric  wrote:

> On 19 May 2019, at 16:56, Mark Millard via freebsd-toolchain 
>  wrote:
>> This was in a poudriere bulk build on a head -r347549 based powerpc64
>> system with system clang 8 for cc and c++ and base/binutils
>> for the likes of ld. (The system has the llvm libunwind patches
>> for powerpc64 so throwing c++ exceptions work.)
>> 
>> [4397/4552] : && /usr/bin/c++ -fPIC -O2 -pipe -DNDEBUG 
>> -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing  
>> -DNDEBUG -isystem /usr/local/include -fPIC -fvisibility-inlines-hidden 
>> -Werror=date-time -Werror=unguarded-availability-new -std=c++11 -Wall -W 
>> -Wno-unused-parameter -Wwrite-strings -Wcast-qual 
>> -Wmissing-field-initializers -pedantic -Wno-long-long 
>> -Wcovered-switch-default -Wnon-virtual-dtor -Wdelete-non-virtual-dtor 
>> -Wstring-conversion -fcolor-diagnostics -ffunction-sections -fdata-sections 
>> -O2 -pipe -DNDEBUG -fstack-protector-strong -isystem /usr/local/include 
>> -fno-strict-aliasing  -DNDEBUG -isystem /usr/local/include  
>> -fstack-protector-strong   -Wl,-z,origin  -Wl,-O3 -Wl,--gc-sections  
>> -Wl,--version-script,/wrkdirs/usr/ports/devel/llvm60/work/.build/tools/lto/LTO.exports
>>  -shared -Wl,-soname,libLTO.so.6 -o lib/libLTO.so.6.0.1 
>> tools/lto/CMakeFiles/LTO.dir/LTODisassembler.cpp.o 
>> tools/lto/CMakeFiles/LTO.dir/lto.cpp.o -L/usr/local/lib -Wl,-rpath,"\$ORIGIN/
 ../
>> lib:/usr/local/lib" lib/libLLVM-6.0.so && :
>> FAILED: lib/libLTO.so.6.0.1
>> : && /usr/bin/c++ -fPIC -O2 -pipe -DNDEBUG -fstack-protector-strong -isystem 
>> /usr/local/include -fno-strict-aliasing  -DNDEBUG -isystem 
>> /usr/local/include -fPIC -fvisibility-inlines-hidden -Werror=date-time 
>> -Werror=unguarded-availability-new -std=c++11 -Wall -W -Wno-unused-parameter 
>> -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic 
>> -Wno-long-long -Wcovered-switch-default -Wnon-virtual-dtor 
>> -Wdelete-non-virtual-dtor -Wstring-conversion -fcolor-diagnostics 
>> -ffunction-sections -fdata-sections -O2 -pipe -DNDEBUG 
>> -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing  
>> -DNDEBUG -isystem /usr/local/include  -fstack-protector-strong   
>> -Wl,-z,origin  -Wl,-O3 -Wl,--gc-sections  
>> -Wl,--version-script,/wrkdirs/usr/ports/devel/llvm60/work/.build/tools/lto/LTO.exports
>>  -shared -Wl,-soname,libLTO.so.6 -o lib/libLTO.so.6.0.1 
>> tools/lto/CMakeFiles/LTO.dir/LTODisassembler.cpp.o 
>> tools/lto/CMakeFiles/LTO.dir/lto.cpp.o -L/usr/local/lib 
>> -Wl,-rpath,"\$ORIGIN/../lib:/usr/
 loc
>> al/lib" lib/libLLVM-6.0.so && :
>> /usr/bin/powerpc64-unknown-freebsd13.0-ld: BFD (GNU Binutils) 2.32 assertion 
>> fail elflink.c:2935
>> /usr/bin/powerpc64-unknown-freebsd13.0-ld: BFD (GNU Binutils) 2.32 assertion 
>> fail elflink.c:2935
> 
> See .  I think this is a BFD ld bug,
> but I still haven't been able to come up with a small test case.  Any
> help appreciated. :-)

(Also noted in bugzilla comment #13:)

The following 2 link commands, producing and
using an vastly-smaller lib/libLLVM-6.0.so
reproduce the messages:

"/usr/bin/powerpc64-unknown-freebsd13.0-ld" \
"-Bshareable" \
"-o" "lib/libLLVM-6.0.so" \
"/usr/lib/crtbeginS.o" \
"--version-script" 
"/wrkdirs/usr/ports/devel/llvm60/work/.build/./lib/tools/llvm-shlib/simple_version_script.map"
 \
"--whole-archive" \
"lib/libLLVMCore.a" \
"--no-whole-archive" \
"-lm"

/usr/bin/powerpc64-unknown-freebsd13.0-ld \
"-Bshareable" \
"-o" "lib/libLTO.so.6.0.1" \
"lib/libLLVM-6.0.so"

It looks like lib/libLLVMCore.a would be next for
making it smaller.


===
Mark Millard
marklmi at yahoo.com
( dsl-only.net went
away in early 2018-Mar)

___
freebsd-toolchain@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-toolchain
To unsubscribe, send any mail to "freebsd-toolchain-unsubscr...@freebsd.org"


Re: FYI: Unable to build -r501994 ports' devel/llvm60 on clang 8 based powerpc64 system: "BFD (GNU Binutils) 2.32 assertion fail elflink.c:2935"

2019-05-19 Thread Mark Millard via freebsd-toolchain



On 2019-May-19, at 11:06, Dimitry Andric  wrote:

> On 19 May 2019, at 16:56, Mark Millard via freebsd-toolchain 
>  wrote:
>> This was in a poudriere bulk build on a head -r347549 based powerpc64
>> system with system clang 8 for cc and c++ and base/binutils
>> for the likes of ld. (The system has the llvm libunwind patches
>> for powerpc64 so throwing c++ exceptions work.)
>> 
>> [4397/4552] : && /usr/bin/c++ -fPIC -O2 -pipe -DNDEBUG 
>> -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing  
>> -DNDEBUG -isystem /usr/local/include -fPIC -fvisibility-inlines-hidden 
>> -Werror=date-time -Werror=unguarded-availability-new -std=c++11 -Wall -W 
>> -Wno-unused-parameter -Wwrite-strings -Wcast-qual 
>> -Wmissing-field-initializers -pedantic -Wno-long-long 
>> -Wcovered-switch-default -Wnon-virtual-dtor -Wdelete-non-virtual-dtor 
>> -Wstring-conversion -fcolor-diagnostics -ffunction-sections -fdata-sections 
>> -O2 -pipe -DNDEBUG -fstack-protector-strong -isystem /usr/local/include 
>> -fno-strict-aliasing  -DNDEBUG -isystem /usr/local/include  
>> -fstack-protector-strong   -Wl,-z,origin  -Wl,-O3 -Wl,--gc-sections  
>> -Wl,--version-script,/wrkdirs/usr/ports/devel/llvm60/work/.build/tools/lto/LTO.exports
>>  -shared -Wl,-soname,libLTO.so.6 -o lib/libLTO.so.6.0.1 
>> tools/lto/CMakeFiles/LTO.dir/LTODisassembler.cpp.o 
>> tools/lto/CMakeFiles/LTO.dir/lto.cpp.o -L/usr/local/lib -Wl,-rpath,"\$ORIGIN/
 ../
>> lib:/usr/local/lib" lib/libLLVM-6.0.so && :
>> FAILED: lib/libLTO.so.6.0.1
>> : && /usr/bin/c++ -fPIC -O2 -pipe -DNDEBUG -fstack-protector-strong -isystem 
>> /usr/local/include -fno-strict-aliasing  -DNDEBUG -isystem 
>> /usr/local/include -fPIC -fvisibility-inlines-hidden -Werror=date-time 
>> -Werror=unguarded-availability-new -std=c++11 -Wall -W -Wno-unused-parameter 
>> -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic 
>> -Wno-long-long -Wcovered-switch-default -Wnon-virtual-dtor 
>> -Wdelete-non-virtual-dtor -Wstring-conversion -fcolor-diagnostics 
>> -ffunction-sections -fdata-sections -O2 -pipe -DNDEBUG 
>> -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing  
>> -DNDEBUG -isystem /usr/local/include  -fstack-protector-strong   
>> -Wl,-z,origin  -Wl,-O3 -Wl,--gc-sections  
>> -Wl,--version-script,/wrkdirs/usr/ports/devel/llvm60/work/.build/tools/lto/LTO.exports
>>  -shared -Wl,-soname,libLTO.so.6 -o lib/libLTO.so.6.0.1 
>> tools/lto/CMakeFiles/LTO.dir/LTODisassembler.cpp.o 
>> tools/lto/CMakeFiles/LTO.dir/lto.cpp.o -L/usr/local/lib 
>> -Wl,-rpath,"\$ORIGIN/../lib:/usr/
 loc
>> al/lib" lib/libLLVM-6.0.so && :
>> /usr/bin/powerpc64-unknown-freebsd13.0-ld: BFD (GNU Binutils) 2.32 assertion 
>> fail elflink.c:2935
>> /usr/bin/powerpc64-unknown-freebsd13.0-ld: BFD (GNU Binutils) 2.32 assertion 
>> fail elflink.c:2935
> 
> See .  I think this is a BFD ld bug,
> but I still haven't been able to come up with a small test case.  Any
> help appreciated. :-)

I've put the evidence leading to the following in the
bugzilla report. The problem is tied to "seed" in:

/wrkdirs/usr/ports/devel/llvm60/work/llvm-6.0.1.src/include/llvm/ADT/Hashing.h 
's:

. . .
namespace llvm {
. . .

// All of the implementation details of actually computing the various hash
// code values are held within this namespace. These routines are included in
// the header file mainly to allow inlining and constant propagation.
namespace hashing {
namespace detail {
. . .

/// \brief A global, fixed seed-override variable.
///
/// This variable can be set using the \see llvm::set_fixed_execution_seed
/// function. See that function for details. Do not, under any circumstances,
/// set or read this variable.
extern size_t fixed_seed_override;

inline size_t get_execution_seed() {
  // FIXME: This needs to be a per-execution seed. This is just a placeholder
  // implementation. Switching to a per-execution seed is likely to flush out
  // instability bugs and so will happen as its own commit.
  //
  // However, if there is a fixed seed override set the first time this is
  // called, return that instead of the per-execution seed.
  const uint64_t seed_prime = 0xff51afd7ed558ccdULL;
  static size_t seed = fixed_seed_override ? fixed_seed_override
   : (size_t)seed_prime;
  return seed;
}

It ends up with *h in the reported BFD_ASSERT failures having:

_ZZN4llvm7hashing6detail18get_execution_seedEvE4seed@@LLVM_6.0
root.type = bfd_link_hash_defweak
is_weakalias = 1

And *h->u.alias having:

__bss_start@@LLVM_6.0
root.type = bfd_link_hash_indirect
is_weakalias = 0

That means in the BFD_ASSERT:

def->root.type==bfd_link_hash_indirect

which fails the assert's: def->root.type == bfd_link_hash_defined


===
Mark Millard
marklmi at yahoo.com
( dsl-only.net went
away in early 2018-Mar)

___
freebsd-toolchain@freebsd.org mailing list

Re: FYI: Unable to build -r501994 ports' devel/llvm60 on clang 8 based powerpc64 system: "BFD (GNU Binutils) 2.32 assertion fail elflink.c:2935"

2019-05-19 Thread Dimitry Andric
On 19 May 2019, at 16:56, Mark Millard via freebsd-toolchain 
 wrote:
> This was in a poudriere bulk build on a head -r347549 based powerpc64
> system with system clang 8 for cc and c++ and base/binutils
> for the likes of ld. (The system has the llvm libunwind patches
> for powerpc64 so throwing c++ exceptions work.)
> 
> [4397/4552] : && /usr/bin/c++ -fPIC -O2 -pipe -DNDEBUG 
> -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing  
> -DNDEBUG -isystem /usr/local/include -fPIC -fvisibility-inlines-hidden 
> -Werror=date-time -Werror=unguarded-availability-new -std=c++11 -Wall -W 
> -Wno-unused-parameter -Wwrite-strings -Wcast-qual 
> -Wmissing-field-initializers -pedantic -Wno-long-long 
> -Wcovered-switch-default -Wnon-virtual-dtor -Wdelete-non-virtual-dtor 
> -Wstring-conversion -fcolor-diagnostics -ffunction-sections -fdata-sections 
> -O2 -pipe -DNDEBUG -fstack-protector-strong -isystem /usr/local/include 
> -fno-strict-aliasing  -DNDEBUG -isystem /usr/local/include  
> -fstack-protector-strong   -Wl,-z,origin  -Wl,-O3 -Wl,--gc-sections  
> -Wl,--version-script,/wrkdirs/usr/ports/devel/llvm60/work/.build/tools/lto/LTO.exports
>  -shared -Wl,-soname,libLTO.so.6 -o lib/libLTO.so.6.0.1 
> tools/lto/CMakeFiles/LTO.dir/LTODisassembler.cpp.o 
> tools/lto/CMakeFiles/LTO.dir/lto.cpp.o -L/usr/local/lib 
> -Wl,-rpath,"\$ORIGIN/../
> lib:/usr/local/lib" lib/libLLVM-6.0.so && :
> FAILED: lib/libLTO.so.6.0.1
> : && /usr/bin/c++ -fPIC -O2 -pipe -DNDEBUG -fstack-protector-strong -isystem 
> /usr/local/include -fno-strict-aliasing  -DNDEBUG -isystem /usr/local/include 
> -fPIC -fvisibility-inlines-hidden -Werror=date-time 
> -Werror=unguarded-availability-new -std=c++11 -Wall -W -Wno-unused-parameter 
> -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic 
> -Wno-long-long -Wcovered-switch-default -Wnon-virtual-dtor 
> -Wdelete-non-virtual-dtor -Wstring-conversion -fcolor-diagnostics 
> -ffunction-sections -fdata-sections -O2 -pipe -DNDEBUG 
> -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing  
> -DNDEBUG -isystem /usr/local/include  -fstack-protector-strong   
> -Wl,-z,origin  -Wl,-O3 -Wl,--gc-sections  
> -Wl,--version-script,/wrkdirs/usr/ports/devel/llvm60/work/.build/tools/lto/LTO.exports
>  -shared -Wl,-soname,libLTO.so.6 -o lib/libLTO.so.6.0.1 
> tools/lto/CMakeFiles/LTO.dir/LTODisassembler.cpp.o 
> tools/lto/CMakeFiles/LTO.dir/lto.cpp.o -L/usr/local/lib 
> -Wl,-rpath,"\$ORIGIN/../lib:/usr/loc
> al/lib" lib/libLLVM-6.0.so && :
> /usr/bin/powerpc64-unknown-freebsd13.0-ld: BFD (GNU Binutils) 2.32 assertion 
> fail elflink.c:2935
> /usr/bin/powerpc64-unknown-freebsd13.0-ld: BFD (GNU Binutils) 2.32 assertion 
> fail elflink.c:2935

See .  I think this is a BFD ld bug,
but I still haven't been able to come up with a small test case.  Any
help appreciated. :-)

-Dimitry



signature.asc
Description: Message signed with OpenPGP


FYI: Unable to build -r501994 ports' devel/llvm60 on clang 8 based powerpc64 system: "BFD (GNU Binutils) 2.32 assertion fail elflink.c:2935"

2019-05-19 Thread Mark Millard via freebsd-toolchain
This was in a poudriere bulk build on a head -r347549 based powerpc64
system with system clang 8 for cc and c++ and base/binutils
for the likes of ld. (The system has the llvm libunwind patches
for powerpc64 so throwing c++ exceptions work.)

[4397/4552] : && /usr/bin/c++ -fPIC -O2 -pipe -DNDEBUG -fstack-protector-strong 
-isystem /usr/local/include -fno-strict-aliasing  -DNDEBUG -isystem 
/usr/local/include -fPIC -fvisibility-inlines-hidden -Werror=date-time 
-Werror=unguarded-availability-new -std=c++11 -Wall -W -Wno-unused-parameter 
-Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic 
-Wno-long-long -Wcovered-switch-default -Wnon-virtual-dtor 
-Wdelete-non-virtual-dtor -Wstring-conversion -fcolor-diagnostics 
-ffunction-sections -fdata-sections -O2 -pipe -DNDEBUG -fstack-protector-strong 
-isystem /usr/local/include -fno-strict-aliasing  -DNDEBUG -isystem 
/usr/local/include  -fstack-protector-strong   -Wl,-z,origin  -Wl,-O3 
-Wl,--gc-sections  
-Wl,--version-script,/wrkdirs/usr/ports/devel/llvm60/work/.build/tools/lto/LTO.exports
 -shared -Wl,-soname,libLTO.so.6 -o lib/libLTO.so.6.0.1 
tools/lto/CMakeFiles/LTO.dir/LTODisassembler.cpp.o 
tools/lto/CMakeFiles/LTO.dir/lto.cpp.o -L/usr/local/lib -Wl,-rpath,"\$ORIGIN/../
 lib:/usr/local/lib" lib/libLLVM-6.0.so && :
FAILED: lib/libLTO.so.6.0.1 
: && /usr/bin/c++ -fPIC -O2 -pipe -DNDEBUG -fstack-protector-strong -isystem 
/usr/local/include -fno-strict-aliasing  -DNDEBUG -isystem /usr/local/include 
-fPIC -fvisibility-inlines-hidden -Werror=date-time 
-Werror=unguarded-availability-new -std=c++11 -Wall -W -Wno-unused-parameter 
-Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic 
-Wno-long-long -Wcovered-switch-default -Wnon-virtual-dtor 
-Wdelete-non-virtual-dtor -Wstring-conversion -fcolor-diagnostics 
-ffunction-sections -fdata-sections -O2 -pipe -DNDEBUG -fstack-protector-strong 
-isystem /usr/local/include -fno-strict-aliasing  -DNDEBUG -isystem 
/usr/local/include  -fstack-protector-strong   -Wl,-z,origin  -Wl,-O3 
-Wl,--gc-sections  
-Wl,--version-script,/wrkdirs/usr/ports/devel/llvm60/work/.build/tools/lto/LTO.exports
 -shared -Wl,-soname,libLTO.so.6 -o lib/libLTO.so.6.0.1 
tools/lto/CMakeFiles/LTO.dir/LTODisassembler.cpp.o 
tools/lto/CMakeFiles/LTO.dir/lto.cpp.o -L/usr/local/lib 
-Wl,-rpath,"\$ORIGIN/../lib:/usr/loc
 al/lib" lib/libLLVM-6.0.so && :
/usr/bin/powerpc64-unknown-freebsd13.0-ld: BFD (GNU Binutils) 2.32 assertion 
fail elflink.c:2935
/usr/bin/powerpc64-unknown-freebsd13.0-ld: BFD (GNU Binutils) 2.32 assertion 
fail elflink.c:2935

The assert is the last BFD_ASSERT shown below:

/* Fix up the flags for a symbol.  This handles various cases which
   can only be fixed after all the input files are seen.  This is
   currently called by both adjust_dynamic_symbol and
   assign_sym_version, which is unnecessary but perhaps more robust in
   the face of future changes.  */

static bfd_boolean
_bfd_elf_fix_symbol_flags (struct elf_link_hash_entry *h,
   struct elf_info_failed *eif)
{
. . .
  if (h->is_weakalias)
{
  struct elf_link_hash_entry *def = weakdef (h);

  /* If the real definition is defined by a regular object file,
 don't do anything special.  See the longer description in
 _bfd_elf_adjust_dynamic_symbol, below.  */
  if (def->def_regular)
{
  h = def;
  while ((h = h->u.alias) != def)
h->is_weakalias = 0;
}
  else
{
  while (h->root.type == bfd_link_hash_indirect)
h = (struct elf_link_hash_entry *) h->root.u.i.link;
  BFD_ASSERT (h->root.type == bfd_link_hash_defined
  || h->root.type == bfd_link_hash_defweak);
  BFD_ASSERT (def->def_dynamic);
  BFD_ASSERT (def->root.type == bfd_link_hash_defined);
  (*bed->elf_backend_copy_indirect_symbol) (eif->info, def, h);
}
}

  return TRUE;
}


===
Mark Millard
marklmi at yahoo.com
( dsl-only.net went
away in early 2018-Mar)

___
freebsd-toolchain@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-toolchain
To unsubscribe, send any mail to "freebsd-toolchain-unsubscr...@freebsd.org"