FS#22306 - [wireless_tools] PKGBUILD doesn't honour CFLAGS

Attached to Project: Arch Linux
Opened by Emil Renner Berthing (Esmil) - Tuesday, 04 January 2011, 09:25 GMT
Last edited by Gaetan Bisson (vesath) - Tuesday, 24 January 2012, 11:16 GMT
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To Gaetan Bisson (vesath)
Architecture All
Severity Very Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
The Makefile in the wireless_tools 29 package doesn't seem to honour the CFLAGS environment variable.
The following small change forces it to do so:

diff --git a/PKGBUILD b/PKGBUILD
index 9a0b709..a169a53 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -15,7 +15,7 @@ md5sums=('e06c222e186f7cc013fd272d023710cb')

build() {
cd ${srcdir}/wireless_tools.${pkgver}
- make
+ make CFLAGS="$CFLAGS -W -Wall -Wextra -I."
}

package() {


Additional info:
I used the 29-4 version of the PKGBUILD.

Steps to reproduce:
Compile wireless_tools with custom CFLAGS set in your /etc/makepkg.conf
This task depends upon

Closed by  Gaetan Bisson (vesath)
Tuesday, 24 January 2012, 11:16 GMT
Reason for closing:  Implemented
Additional comments about closing:  wireless_tools-29-6 in [testing]
Comment by Andrea Scarpino (BaSh) - Tuesday, 04 January 2011, 10:27 GMT
Assigned to last packager
Comment by Pierre Schmitz (Pierre) - Thursday, 06 January 2011, 07:56 GMT
Are you sure this one works? The Makefiles defines its own CFLAGS. Maybe contact upstream about this.

Anyway, I am not the maintainer (and my rebuild did not introduce this bug).
Comment by Emil Renner Berthing (Esmil) - Thursday, 06 January 2011, 09:18 GMT
Yes, the CFLAGS in the Makefile reads

CFLAGS=-Os -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Wpointer-arith -Wcast-qual -Winline -I.

All the -W* flags just controls warnings and shouldn't have any effect on the output.
All I've done is to replace those warnings with -Wextra which should just add even more warnings.
You can do

make CFLAGS="$CFLAGS -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Wpointer-arith -Wcast-qual -Winline -I."

if you want to adhere strictly to what's in the Makefile.

Loading...