I've changed the scripts/detect_cc.sh to accept additional linker parameter and set
LLVM as default toolchain on FreeBSD. Please have a look at
https://review.gerrithub.io/c/spdk/spdk/+/438801/3
Konrad
-----Original Message-----
From: SPDK [mailto:spdk-bounces@lists.01.org] On Behalf Of Harris, James R
Sent: Wednesday, December 19, 2018 6:01 PM
To: Storage Performance Development Kit <spdk(a)lists.01.org>
Subject: Re: [SPDK] FreeBSD CI environment
On 12/19/18, 9:51 AM, "SPDK on behalf of Walker, Benjamin"
<spdk-bounces(a)lists.01.org on behalf of benjamin.walker(a)intel.com> wrote:
On Wed, 2018-12-19 at 16:00 +0000, Harris, James R wrote:
Hi Konrad,
I'm thinking we update the mk/cc.mk machinery to do this
automatically. Currently this only sets up CC and CXX but I don't see why we
couldn't have this specify the linker as well.
scripts/detect_cc.sh, which generates mk/cc.mk already detects the linker type.
It uses that to figure out which archiver to use for link-time optimization
support, since standard 'ar' isn't sufficient. It should just be a matter
of
outputting this to mk/cc.mk inside of detect_cc.sh.
It's a bit more than that. FreeBSD 11 and earlier have ld point to a very old GNU
BFD. FreeBSD 12 now has ld=LLD. But we want SPDK to use LLD across the board. On
FreeBSD 11 (and 10?) LLD is available it's just not /usr/bin/ld.
Would you like to take a look at this?
-Jim
On 12/19/18, 5:37 AM, "SPDK on behalf of Sztyber, Konrad" <
spdk-bounces(a)lists.01.org on behalf of konrad.sztyber(a)intel.com> wrote:
Hi Jim,
So can we get these flags set before the build on the FreeBSD CI machines?
Thanks,
Konrad
-----Original Message-----
From: Sztyber, Konrad
Sent: Friday, December 14, 2018 4:08 PM
To: Storage Performance Development Kit <spdk(a)lists.01.org>
Subject: RE: [SPDK] FreeBSD CI environment
Yeah, that makes more sense. I got rid of doubled spdk.mock.unittest.mk
inclusions and the code builds under older LLVM as well. So it's just a matter
of "setenv CC clang; setenv CXX clang++; setenv LDFLAGS -fuse-ld=lld" on the
FreeBSD machines before the build now.
Thanks,
Konrad
-----Original Message-----
From: SPDK [mailto:spdk-bounces@lists.01.org] On Behalf Of Harris, James R
Sent: Thursday, December 13, 2018 6:30 PM
To: Storage Performance Development Kit <spdk(a)lists.01.org>
Subject: Re: [SPDK] FreeBSD CI environment
Hi Konrad,
Thanks for the quick turnaround. Could we instead fix the unit test
Makefiles that are pulling in the wrap options twice? I just did a "Q= make
-C test/unit" build and I think I see just a handful of tests that are
violating this currently.
-Jim
On 12/13/18, 9:39 AM, "SPDK on behalf of Sztyber, Konrad" <
spdk-bounces(a)lists.01.org on behalf of konrad.sztyber(a)intel.com> wrote:
I've just tried to use LLVM's ldd, but it appears to have a problem
with repeated --wrap=foo options (it causes infinite loop when the wrapper
calls __real symbol), which is the case when building unit tests. It's already
fixed on the recent versions of lld, so we could use one from the llvm-devel
package.
Thanks,
Konrad
-----Original Message-----
From: SPDK [mailto:spdk-bounces@lists.01.org] On Behalf Of Harris,
James R
Sent: Thursday, December 13, 2018 3:42 PM
To: Storage Performance Development Kit <spdk(a)lists.01.org>
Subject: Re: [SPDK] FreeBSD CI environment
Hi Konrad,
I think we explored this a while back, and ran into the same issue as
you. The problem is that FreeBSD in general has moved away from the GNU
toolchain towards LLVM. I know that we already require GNU make, but I don't
want to add yet another dependency on the GNU toolchain.
Can you try this with LLVM's lld linker instead? On systems where
that is not available, I'd be open to skipping the unit test build on FreeBSD
and/or adding lld to pkgdep.sh.
Thanks,
-Jim
On 12/13/18, 5:43 AM, "SPDK on behalf of Sztyber, Konrad" <
spdk-bounces(a)lists.01.org on behalf of konrad.sztyber(a)intel.com> wrote:
Hi all,
I've pushed a patch recently (
https://review.gerrithub.io/#/c/spdk/spdk/+/436319/) that adds parameters to
compilation/linking of unit tests to remove unused functions from the final
executables. It's rather useful, because it allows to omit mocking functions
that aren't called by tested code. However, the problem with that is that it
breaks the CI on the FreeBSD machine, because the linker hits some kind of
assertion and crashes. The default linker used there is pretty old (BFD
2.17.50 [FreeBSD] 2007-07-03) and I've found that installing gcc and using it
to build SPDK fixes it. Would it be possible to update the FreeBSD machines
and force Jenkins to use gcc on FreeBSD?
Thanks,
Konrad
----------------------------------------------------------------
----
Intel Technology Poland sp. z o.o.
ul. Slowackiego 173 | 80-298 Gdansk | Sad Rejonowy Gdansk Polnoc |
VII Wydzial Gospodarczy Krajowego Rejestru Sadowego - KRS 101882 | NIP 957-07-
52-316 | Kapital zakladowy 200.000 PLN.
Ta wiadomosc wraz z zalacznikami jest przeznaczona dla okreslonego
adresata i moze zawierac informacje poufne. W razie przypadkowego otrzymania
tej wiadomosci, prosimy o powiadomienie nadawcy oraz trwale jej usuniecie;
jakiekolwiek
przegladanie lub rozpowszechnianie jest zabronione.
This e-mail and any attachments may contain confidential material
for the sole use of the intended recipient(s). If you are not the intended
recipient, please contact the sender and delete all copies; any review or
distribution by
others is strictly prohibited.
_______________________________________________
SPDK mailing list
SPDK(a)lists.01.org
https://lists.01.org/mailman/listinfo/spdk
_______________________________________________
SPDK mailing list
SPDK(a)lists.01.org
https://lists.01.org/mailman/listinfo/spdk
--------------------------------------------------------------------
Intel Technology Poland sp. z o.o.
ul. Slowackiego 173 | 80-298 Gdansk | Sad Rejonowy Gdansk Polnoc | VII
Wydzial Gospodarczy Krajowego Rejestru Sadowego - KRS 101882 | NIP 957-07-52-
316 | Kapital zakladowy 200.000 PLN.
Ta wiadomosc wraz z zalacznikami jest przeznaczona dla okreslonego
adresata i moze zawierac informacje poufne. W razie przypadkowego otrzymania
tej wiadomosci, prosimy o powiadomienie nadawcy oraz trwale jej usuniecie;
jakiekolwiek
przegladanie lub rozpowszechnianie jest zabronione.
This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). If you are not the intended
recipient, please contact the sender and delete all copies; any review or
distribution by
others is strictly prohibited.
_______________________________________________
SPDK mailing list
SPDK(a)lists.01.org
https://lists.01.org/mailman/listinfo/spdk
_______________________________________________
SPDK mailing list
SPDK(a)lists.01.org
https://lists.01.org/mailman/listinfo/spdk
--------------------------------------------------------------------
Intel Technology Poland sp. z o.o.
ul. Slowackiego 173 | 80-298 Gdansk | Sad Rejonowy Gdansk Polnoc | VII
Wydzial Gospodarczy Krajowego Rejestru Sadowego - KRS 101882 | NIP 957-07-52-
316 | Kapital zakladowy 200.000 PLN.
Ta wiadomosc wraz z zalacznikami jest przeznaczona dla okreslonego
adresata i moze zawierac informacje poufne. W razie przypadkowego otrzymania
tej wiadomosci, prosimy o powiadomienie nadawcy oraz trwale jej usuniecie;
jakiekolwiek
przegladanie lub rozpowszechnianie jest zabronione.
This e-mail and any attachments may contain confidential material for the
sole use of the intended recipient(s). If you are not the intended recipient,
please contact the sender and delete all copies; any review or distribution by
others is strictly prohibited.
_______________________________________________
SPDK mailing list
SPDK(a)lists.01.org
https://lists.01.org/mailman/listinfo/spdk
_______________________________________________
SPDK mailing list
SPDK(a)lists.01.org
https://lists.01.org/mailman/listinfo/spdk
_______________________________________________
SPDK mailing list
SPDK(a)lists.01.org
https://lists.01.org/mailman/listinfo/spdk
_______________________________________________
SPDK mailing list
SPDK(a)lists.01.org
https://lists.01.org/mailman/listinfo/spdk
--------------------------------------------------------------------
Intel Technology Poland sp. z o.o.
ul. Slowackiego 173 | 80-298 Gdansk | Sad Rejonowy Gdansk Polnoc | VII Wydzial Gospodarczy
Krajowego Rejestru Sadowego - KRS 101882 | NIP 957-07-52-316 | Kapital zakladowy 200.000
PLN.
Ta wiadomosc wraz z zalacznikami jest przeznaczona dla okreslonego adresata i moze
zawierac informacje poufne. W razie przypadkowego otrzymania tej wiadomosci, prosimy o
powiadomienie nadawcy oraz trwale jej usuniecie; jakiekolwiek
przegladanie lub rozpowszechnianie jest zabronione.
This e-mail and any attachments may contain confidential material for the sole use of the
intended recipient(s). If you are not the intended recipient, please contact the sender
and delete all copies; any review or distribution by
others is strictly prohibited.