Pacman

Historical bug tracker for the Pacman package manager.

The pacman bug tracker has moved to gitlab:
https://gitlab.archlinux.org/pacman/pacman/-/issues

This tracker remains open for interaction with historical bugs during the transition period. Any new bugs reports will be closed without further action.
Tasklist

FS#15146 - [makepkg] add flag to unset cflags/ldflags

Attached to Project: Pacman
Opened by Allan McRae (Allan) - Wednesday, 17 June 2009, 08:10 GMT
Last edited by Allan McRae (Allan) - Thursday, 30 December 2010, 01:42 GMT
Task Type Feature Request
Category makepkg
Status Closed
Assigned To Allan McRae (Allan)
Architecture All
Severity Low
Priority Normal
Reported Version 3.2.2
Due in Version 3.5.0
Due Date Undecided
Percent Complete 100%
Votes 2
Private No

Details

Summary and Info:
Sometimes the default CFLAGS stop a package from building. This is even more prevalent with LDFLAGS. It would be good to have a flag to override them like is done with makeflags.
This task depends upon

Closed by  Allan McRae (Allan)
Thursday, 30 December 2010, 01:42 GMT
Reason for closing:  Implemented
Additional comments about closing:  http://projects.archlinux.org/users/alla n/pacman.git/commit/?id=2052f29c
Comment by Dan McGee (toofishes) - Tuesday, 10 November 2009, 17:49 GMT
Not sure if this is a dream, but what if in the PKGBUILD you could do something like:
remove_makeflag '-j'
and it would leave everything else intact except for the '-j5' flag I have set, for instance? We could do something similar with cflags and ldflags:
remove_ldflag '--as-needed'
remove_cflag '-O2' (this would touch both cflags and cxxflags)

Please set me in my place if you think this is going too far.
Comment by Allan McRae (Allan) - Tuesday, 10 November 2009, 22:10 GMT
I actually think this is a good idea. Most of the issues I come across with {C,LD}FLAGS are due to a single flag. But there are cases where you want to disable CFLAGS completely and use upstream defaults (firefox) so as long as both can occur, I would be happy.
Comment by Xavier (shining) - Tuesday, 10 November 2009, 23:59 GMT
Doesn't firefox use its own cflags by default anyway ? I remember an option about cflags in the build config file.
Anyway it does not matter.

If you want to disable CFLAGS completely, maybe that's easy enough to do directly in the pkgbuild ? Like unset CFLAGS or CFLAGS="" ?
What seems more tricky is to remove something.

What if you want to remove "-j[ ]*[0-9]*" or "-O[ ]*[0-9]*" , that is any -j or -O settings ?
Comment by Dan McGee (toofishes) - Wednesday, 11 November 2009, 00:02 GMT
remove_makeflag '-j'
remove_cflag '-O'
Comment by Xavier (shining) - Wednesday, 11 November 2009, 00:26 GMT
I still don't clearly see how you can know when you want to transform the argument to a regexp (-O , -j) , and when you don't (-O2, --as-needed, etc)
Comment by Allan McRae (Allan) - Monday, 27 December 2010, 10:34 GMT
patch: http://mailman.archlinux.org/pipermail/pacman-dev/2010-December/012132.html

This just implements complete clearing of CFLAGS, CXXFLAGS and LDFLAGS which is primarily useful for testing build issues. Clearing of individual flags seems too difficult to do properly.

Loading...