makepkg.conf question #198

Closed
opened 2023-06-10 10:17:29 +02:00 by blackhole · 2 comments

Now I have the default makepkg.conf with

CARCH="x86_64"
CHOST="x86_64-pc-linux-gnu"

#-- Compiler and Linker Flags
#CPPFLAGS=""
CFLAGS="-march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions \
        -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security \
        -fstack-clash-protection -fcf-protection"

Since I have some local and AUR packages,should I modify it with

CARCH="x86_64"
CHOST="x86_64-pc-linux-gnu"

#-- Compiler and Linker Flags
#CPPFLAGS=""
CFLAGS="-march=native -O2 -pipe -fno-plt -fexceptions \
        -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security \
        -fstack-clash-protection -fcf-protection"
        

Or 03 instead of 02? CARCH value is right?

Note: I have modified pacman.conf adding Architecture = x86_64 x86_64_v3

Now I have the default makepkg.conf with ``` CARCH="x86_64" CHOST="x86_64-pc-linux-gnu" #-- Compiler and Linker Flags #CPPFLAGS="" CFLAGS="-march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions \ -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security \ -fstack-clash-protection -fcf-protection" ``` Since I have some local and AUR packages,should I modify it with ``` CARCH="x86_64" CHOST="x86_64-pc-linux-gnu" #-- Compiler and Linker Flags #CPPFLAGS="" CFLAGS="-march=native -O2 -pipe -fno-plt -fexceptions \ -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security \ -fstack-clash-protection -fcf-protection" ``` Or 03 instead of 02? CARCH value is right? Note: I have modified pacman.conf adding *Architecture = x86_64 x86_64_v3*
Owner

If you just want to build local packages, you do not need to modify CARCH or pacman's Architecture. Modifying -march is enough.

If you want to build with -O3 instead of -O2 is your decision to make. You essentially trade more compile-time and a potentially bigger binary for potentially more optimization.

You can also have a look at ALHP's makepkgs: https://alhp.dev/makepkg/

If you just want to build local packages, you do not need to modify `CARCH` or pacman's `Architecture`. Modifying `-march` is enough. If you want to build with `-O3` instead of `-O2` is your decision to make. You essentially trade more compile-time and a potentially bigger binary for potentially more optimization. You can also have a look at ALHP's makepkgs: https://alhp.dev/makepkg/
anonfunc added the
support
label 2023-06-10 13:13:00 +02:00
Author

Ok. Thanks for the clarification.

Ok. Thanks for the clarification.
Sign in to join this conversation.
No description provided.