This is an archive of the discontinued LLVM Phabricator instance.

llvm/cmake/config.guess: update to current version
Needs RevisionPublic

Authored by hvdijk on Mar 30 2021, 3:33 PM.

Details

Reviewers
MaskRay
Bdragon28
Summary

This copies current upstream config.guess to llvm/cmake/config.guess, to pick up upstream's detection for x86_64-pc-linux-gnux32. The previous version of config.guess had various changes applied; all of these changes are part of the upstream version.

@MaskRay: I am adding you as a reviewer as there is no specific owner mentioned in CODE_OWNERS.TXT, but you reviewed a recent change that applied one of those manual modifications to config.guess (D93918). Do you remember whether there was a particular reason not to just take the upstream version?

Diff Detail

Event Timeline

hvdijk created this revision.Mar 30 2021, 3:33 PM
hvdijk requested review of this revision.Mar 30 2021, 3:33 PM
MaskRay accepted this revision.Mar 30 2021, 3:53 PM
MaskRay added a subscriber: Bdragon28.

Seems reasonable. Hope @Bdragon28 can confirm powerpcle-unknown-linux-gnu still works.

This revision is now accepted and ready to land.Mar 30 2021, 3:53 PM
Bdragon28 requested changes to this revision.Mar 30 2021, 7:46 PM

I'm pretty sure we're using this old config.guess on purpose to avoid GPL3 code.

llvm/cmake/config.guess
9

Err, the reason we're on this old version is specifically to prevent GPL3 code from being in tree, I thought.

This revision now requires changes to proceed.Mar 30 2021, 7:46 PM
MaskRay requested changes to this revision.Mar 30 2021, 7:53 PM

Interesting, did not know the difference. There are other GPL 3 config.guess in llvm-project. But license issues should ... always be taken prudently, so may deserve a discussion on llvm-dev.

% rg 'Free Software Foundation; either version 3 of'
polly/lib/External/isl/config.sub
9:# the Free Software Foundation; either version 3 of the License, or

polly/lib/External/isl/config.guess
9:# the Free Software Foundation; either version 3 of the License, or

polly/lib/External/isl/ltmain.sh
78:# the Free Software Foundation; either version 3 of the License, or

polly/lib/External/isl/interface/config.guess
9:# the Free Software Foundation; either version 3 of the License, or

polly/lib/External/isl/interface/config.sub
9:# the Free Software Foundation; either version 3 of the License, or

polly/lib/External/isl/interface/ltmain.sh
78:# the Free Software Foundation; either version 3 of the License, or

polly/lib/External/isl/m4/ax_create_pkgconfig_info.m4
37:#   Free Software Foundation; either version 3 of the License, or (at your
Bdragon28 added inline comments.Mar 30 2021, 7:55 PM
llvm/cmake/config.guess
25

And since we don't use Autoconf with this copy of the file, this exemption doesn't apply, so yeah, I'm pretty sure this change isn't allowed in tree.

Yeah, I think the only reason the isl code can get away with it is that it's related to the usage of Autoconf in that directory. llvm/cmake/config.guess doesn't have that exemption because it's being invoked from a cmake module, not an Autoconf script.

If that were the reason, why are we not using the last GPLv2 version of config.guess, rather than the one that we happened to use back when we had an autoconf build system?

We never link to config.guess or otherwise include its code into LLVM, we only read its output. The GPL, whether v2 or v3, places no restrictions on how that output is used. But agreed that it is good to be cautious, so will ask on the list.

Interesting, did not know the difference. There are other GPL 3 config.guess in llvm-project. But license issues should ... always be taken prudently, so may deserve a discussion on llvm-dev.

% rg 'Free Software Foundation; either version 3 of'
polly/lib/External/isl/config.sub
9:# the Free Software Foundation; either version 3 of the License, or

polly/lib/External/isl/config.guess
9:# the Free Software Foundation; either version 3 of the License, or

polly/lib/External/isl/ltmain.sh
78:# the Free Software Foundation; either version 3 of the License, or

polly/lib/External/isl/interface/config.guess
9:# the Free Software Foundation; either version 3 of the License, or

polly/lib/External/isl/interface/config.sub
9:# the Free Software Foundation; either version 3 of the License, or

polly/lib/External/isl/interface/ltmain.sh
78:# the Free Software Foundation; either version 3 of the License, or

polly/lib/External/isl/m4/ax_create_pkgconfig_info.m4
37:#   Free Software Foundation; either version 3 of the License, or (at your

These come from external projects that are autotools-configured in their distribution package (but not in their source repository, with the exception of ax_create_pkgconfig_info.m4). In my understanding it is ok for non-GPL 3 software to use autotools and distribute the output of make dist in the original license.

It might be theoretically possibly to instead use GPLv2-licensed old version of autotools instead of a GPLv3-licensed one, if one can get one installed in parallel on a modern GNU/Linux distribution. However, in the LLVM-tree, we use CMake to build it, so none of the files above are actually needed, and I we could remove them if they pose a problem.