GNU bug report logs - #47676
[PATCH] Add 'compiler-for-target' checker

Previous Next

Package: guix-patches;

Reported by: Maxime Devos <maximedevos <at> telenet.be>

Date: Fri, 9 Apr 2021 17:23:01 UTC

Severity: normal

Tags: patch

Full log


View this message in rfc822 format

From: Maxime Devos <maximedevos <at> telenet.be>
To: 47676 <at> debbugs.gnu.org
Subject: [bug#47676] [PATCH] Add 'compiler-for-target' checker
Date: Fri, 09 Apr 2021 17:50:35 +0200
[Message part 1 (text/plain, inline)]
Hi Guix,

This patch series adds a linter that detects "CC=gcc" and "CXX=g++"
in #:make-flags in the arguments field of a package.  This is incorrect
when cross-compiling; ,(string-append "CC=" (cc-for-target)) or similar
should be used instead.

Patch #1: detect "CC=gcc".
Patch #2: detect "CXX=g++".

Some complaints from the checker:
$ ./pre-inst-env guix lint -c "compiler-for-target"
> gnu/packages/admin.scm:3138:5: sunxi-tools <at> 1.4.2: should use 'cc-for-target'
> gnu/packages/admin.scm:2969:5: cbatticon <at> 1.6.10: should use 'cc-for-target'
> gnu/packages/assembly.scm:230:5: dev86 <at> 0.16.21: should use 'cc-for-target'
> gnu/packages/audio.scm:4870:4: lv2toweb <at> 0.4: should use 'cc-for-target'
> gnu/packages/audio.scm:1134:5: swh-plugins-lv2 <at> 1.0.16: should use 'cc-for-target'
> gnu/packages/base.scm:1290:5: tzdata <at> 2021a: should use 'cc-for-target'
> gnu/packages/bioinformatics.scm:10977:5: paml <at> 4.9e: should use 'cc-for-target'
> gnu/packages/bioinformatics.scm:1677:5: bowtie1 <at> 1.3.0: should use 'cc-for-target'
> gnu/packages/bioinformatics.scm:4885:5: mash <at> 2.1: should use 'cc-for-target'
> [...]

"make && make check TESTS=tests/lint.scm" succeeds.

Greetings,
Maxime.
[0001-lint-Add-compiler-for-target-checker.patch (text/x-patch, attachment)]
[0002-lint-Extend-compiler-for-target-to-detect-CXX-g.patch (text/x-patch, attachment)]
[signature.asc (application/pgp-signature, inline)]

This bug report was last modified 4 years and 65 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.