Re: gcc/clang interoperability problem with a custom "samba" build in recent -current.
On 25/7/18 12:40 am, Julian Elischer wrote: On 22/7/18 4:32 am, Dimitry Andric wrote: On 21 Jul 2018, at 21:11, Yuri Pankov wrote: Yuri Pankov wrote: Julian Elischer wrote: ... anyone know if there is a clang equivalent of -Wp, -E,-lang-asm? In later GCC versions the cpp's -lang-asm seems to be deprecated in favor of -x assembler-with-cpp as it conflicts with -l option. Could you try changing the -Wp,-E,-lang-asm to -Wp,-E,-xassembler-with-cpp? I did this but if failed.. I had to reread this email a few times to think of replacing the whole -Wp,-E,-lang-asm with just -xassembler-with-cpp! Just tried it myself, and if you indeed mean the third_party/aesni-intel/aesni-intel_asm.c, the following seems to work for me: clang -xassembler-with-cpp -c third_party/aesni-intel/aesni-intel_asm.c Yes, that is exactly what I suggested to Julian on IRC. The point is that the ".c" extension is misleading, it should more likely be a ".S" extension. But maybe this source file is used for multiple purposes. Note that -x assembler-with-cpp should also work fine for gcc. Ah.. the trick is to remove the -Wp,-E as well... -Dimitry thanks I tried that but the version of the file we have has several lines that caused problems... a lot of the assembler has assembler comments (starting with '#') which clang complained about and died.. it also had #.align 4 which I HOPE is just a commented out line.. ___ freebsd-current@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org" ___ freebsd-current@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: gcc/clang interoperability problem with a custom "samba" build in recent -current.
On 22/7/18 3:11 am, Yuri Pankov wrote: Yuri Pankov wrote: Julian Elischer wrote: I would really like ot get some pointers as to who are our tools committers at the moment, in particular who might know about these issues. The main issue for me at the moment is the ability to compile the aesni code in Samba from clang.. Julian On 20/7/18 7:32 pm, Julian Elischer wrote: 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? In later GCC versions the cpp's -lang-asm seems to be deprecated in favor of -x assembler-with-cpp as it conflicts with -l option. Could you try changing the -Wp,-E,-lang-asm to -Wp,-E,-xassembler-with-cpp? Just tried it myself, and if you indeed mean the third_party/aesni-intel/aesni-intel_asm.c, the following seems to work for me: clang -xassembler-with-cpp -c third_party/aesni-intel/aesni-intel_asm.c when I try it I get lots of errors due to hte fact that there are assembled comments that start with # and they are all cited as errors by clang. I had to put '//' before about 80 lines line that. 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? ___ freebsd-current@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: gcc/clang interoperability problem with a custom "samba" build in recent -current.
On 22/7/18 4:32 am, Dimitry Andric wrote: On 21 Jul 2018, at 21:11, Yuri Pankov wrote: Yuri Pankov wrote: Julian Elischer wrote: ... anyone know if there is a clang equivalent of -Wp, -E,-lang-asm? In later GCC versions the cpp's -lang-asm seems to be deprecated in favor of -x assembler-with-cpp as it conflicts with -l option. Could you try changing the -Wp,-E,-lang-asm to -Wp,-E,-xassembler-with-cpp? Just tried it myself, and if you indeed mean the third_party/aesni-intel/aesni-intel_asm.c, the following seems to work for me: clang -xassembler-with-cpp -c third_party/aesni-intel/aesni-intel_asm.c Yes, that is exactly what I suggested to Julian on IRC. The point is that the ".c" extension is misleading, it should more likely be a ".S" extension. But maybe this source file is used for multiple purposes. Note that -x assembler-with-cpp should also work fine for gcc. -Dimitry thanks I tried that but the version of the file we have has several lines that caused problems... a lot of the assembler has assembler comments (starting with '#') which clang complained about and died.. it also had #.align 4 which I HOPE is just a commented out line.. ___ freebsd-current@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: gcc/clang interoperability problem with a custom "samba" build in recent -current.
On 21 Jul 2018, at 21:11, Yuri Pankov wrote: > > Yuri Pankov wrote: >> Julian Elischer wrote: ... anyone know if there is a clang equivalent of -Wp, -E,-lang-asm? >> In later GCC versions the cpp's -lang-asm seems to be deprecated in >> favor of -x assembler-with-cpp as it conflicts with -l option. >> Could you try changing the -Wp,-E,-lang-asm to -Wp,-E,-xassembler-with-cpp? > > Just tried it myself, and if you indeed mean the > third_party/aesni-intel/aesni-intel_asm.c, the following seems to work for me: > > clang -xassembler-with-cpp -c third_party/aesni-intel/aesni-intel_asm.c Yes, that is exactly what I suggested to Julian on IRC. The point is that the ".c" extension is misleading, it should more likely be a ".S" extension. But maybe this source file is used for multiple purposes. Note that -x assembler-with-cpp should also work fine for gcc. -Dimitry signature.asc Description: Message signed with OpenPGP
Re: gcc/clang interoperability problem with a custom "samba" build in recent -current.
Yuri Pankov wrote: Julian Elischer wrote: I would really like ot get some pointers as to who are our tools committers at the moment, in particular who might know about these issues. The main issue for me at the moment is the ability to compile the aesni code in Samba from clang.. Julian On 20/7/18 7:32 pm, Julian Elischer wrote: 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? In later GCC versions the cpp's -lang-asm seems to be deprecated in favor of -x assembler-with-cpp as it conflicts with -l option. Could you try changing the -Wp,-E,-lang-asm to -Wp,-E,-xassembler-with-cpp? Just tried it myself, and if you indeed mean the third_party/aesni-intel/aesni-intel_asm.c, the following seems to work for me: clang -xassembler-with-cpp -c third_party/aesni-intel/aesni-intel_asm.c 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? ___ freebsd-current@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: gcc/clang interoperability problem with a custom "samba" build in recent -current.
Julian Elischer wrote: I would really like ot get some pointers as to who are our tools committers at the moment, in particular who might know about these issues. The main issue for me at the moment is the ability to compile the aesni code in Samba from clang.. Julian On 20/7/18 7:32 pm, Julian Elischer wrote: 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? In later GCC versions the cpp's -lang-asm seems to be deprecated in favor of -x assembler-with-cpp as it conflicts with -l option. Could you try changing the -Wp,-E,-lang-asm to -Wp,-E,-xassembler-with-cpp? 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? ___ freebsd-current@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: gcc/clang interoperability problem with a custom "samba" build in recent -current.
I would really like ot get some pointers as to who are our tools committers at the moment, in particular who might know about these issues. The main issue for me at the moment is the ability to compile the aesni code in Samba from clang.. Julian On 20/7/18 7:32 pm, Julian Elischer wrote: 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 ___ freebsd-current@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org" ___ freebsd-current@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
gcc/clang interoperability problem with a custom "samba" build in recent -current.
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 ___ freebsd-current@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"