[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

From: Maxime Devos
Subject: [bug#47676] [PATCH] Add 'compiler-for-target' checker
Date: Fri, 09 Apr 2021 17:50:35 +0200
User-agent: Evolution 3.34.2

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@1.4.2: should use 'cc-for-target'
> gnu/packages/admin.scm:2969:5: cbatticon@1.6.10: should use 'cc-for-target'
> gnu/packages/assembly.scm:230:5: dev86@0.16.21: should use 'cc-for-target'
> gnu/packages/audio.scm:4870:4: lv2toweb@0.4: should use 'cc-for-target'
> gnu/packages/audio.scm:1134:5: swh-plugins-lv2@1.0.16: should use 
> 'cc-for-target'
> gnu/packages/base.scm:1290:5: tzdata@2021a: should use 'cc-for-target'
> gnu/packages/bioinformatics.scm:10977:5: paml@4.9e: should use 'cc-for-target'
> gnu/packages/bioinformatics.scm:1677:5: bowtie1@1.3.0: should use 
> 'cc-for-target'
> gnu/packages/bioinformatics.scm:4885:5: mash@2.1: should use 'cc-for-target'
> [...]

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


Attachment: 0001-lint-Add-compiler-for-target-checker.patch
Description: Text Data

Attachment: 0002-lint-Extend-compiler-for-target-to-detect-CXX-g.patch
Description: Text Data

Attachment: signature.asc
Description: This is a digitally signed message part

reply via email to

[Prev in Thread] Current Thread [Next in Thread]