gcc/clang interoperability problem with a custom "samba" build in recent -current.

Julian Elischer julian at freebsd.org
Fri Jul 20 11:36:31 UTC 2018


compiling our samba with gcc 4.2.1 in 12 gave us some off behaviour 
when lld became the linker I think..

1/ linking needed some directories added to some of the build scripts 
because previously apparently it looked in $SYSROOT/usr/lib by default 
and now it doesn't.

2/ compiling our samba produces a libtdb.so that has various symbols 
in it, (according to nm(1) ), but when we try link against it we get 
complaints about those symbols not being defined.

3/ an attempt to switch to using clang to compile everything leads to:


"--aes-accel=intelaesni selected and compiler rejects -Wp,-E,-lang-asm.

One wonders whether there is a clang equivalent of "-Wp,-E,-lang-asm"

The AES acceleration is a configure option for the samba package.

Apparently turning it on requires -Wp,-E,-lang-asm.

which apparently gcc 4.2.1 has, but clang doesn't have.

    FreeBSD clang version 6.0.1 (tags/RELEASE_601/final 335540) (based
    on LLVM 6.0.1)
    Target: x86_64-unknown-freebsd12.0
    Thread model: posix
    InstalledDir: /usr/bin

anyone know if there is a clang equivalent of -Wp, -E,-lang-asm?

possible work arrounds include:

1/ Get gcc/lld to produce a library from which lld can find the symbols

2/ find a way to compile this with clang but everything else with gcc?

3/ find a way to allow clang to use
-Wp,-E,-lang-asm

whatever that means


Thoughts from any tools people?

Julian



More information about the freebsd-current mailing list