You are not logged in.

#1 2019-09-17 19:25:52

ewirch
Member
Registered: 2017-09-14
Posts: 2

Is it ok, that pacman deploys GCC specific flags in /etc/makepkg.conf?

I wonder why these flags have been added to /etc/makepkg.conf:

DEBUG_CFLAGS="-g -fvar-tracking-assignments"
DEBUG_CXXFLAGS="-g -fvar-tracking-assignments"

-fvar-tracking-assignments is GCC specific. Compilation fails if Clang is used. /etc/makepkg.conf doesn't state, that it requires GCC. One cannot expect, that GCC is the main compiler on a system.

In fact there is at least one package which explicitly requires Clang for building: https://aur.archlinux.org/packages/clingo. It fails building if 'debug' option is enabled in makepkg.conf.

Offline

#2 2019-09-17 19:37:51

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: Is it ok, that pacman deploys GCC specific flags in /etc/makepkg.conf?

That one package is not in the official repos...


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2019-09-17 19:52:10

ewirch
Member
Registered: 2017-09-14
Posts: 2

Re: Is it ok, that pacman deploys GCC specific flags in /etc/makepkg.conf?

I know. It's not about that one package. It's about "-fvar-tracking-assignments is GCC specific. ... /etc/makepkg.conf doesn't state, that it requires GCC. One cannot expect, that GCC is the main compiler on a system."

Offline

#4 2019-09-17 19:56:50

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,523
Website

Re: Is it ok, that pacman deploys GCC specific flags in /etc/makepkg.conf?

One can expect that gcc is the default compiler on an arch linux system ... because it is.

Keep in mind I say this as someone who much prefers portability, standards compliance, and not assuming gcc or glib when others may be used.  But it is just simple fact that gcc is the default for arch linux, and PKGBUILDs are for arch linux.  If you use a different compiler, then you should be prepared to make some modifications.  If you use a different libc (which I often do) then you need to be ready to do some patching (as I do).

Makepkg also assumes that BASH is installed on the system.  Some repo utilities even assume (or at least in the recent past have assumed) that /bin/sh is bash.  This has been an annoyance for me, but when something fails, I know it's because I've relinked /bin/sh to another shell - so it's up to me to fix it.

Just the same here - you are welcome to use a non-standard compiler, but it is up to you to patch what you need to ensure it works.

Last edited by Trilby (2019-09-17 19:58:57)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

Board footer

Powered by FluxBB