Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6620125
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T21:03:31+00:00 2026-05-25T21:03:31+00:00

In Arch Linux PKGBUILD for surf browser, there is: sed -i ‘s/CPPFLAGS =/CPPFLAGS +=/g’

  • 0

In Arch Linux PKGBUILD for surf browser, there is:

sed -i 's/CPPFLAGS =/CPPFLAGS +=/g' config.mk
sed -i 's/CFLAGS =/CFLAGS +=/g' config.mk
sed -i 's/LDFLAGS =/LDFLAGS +=/g' config.mk

Why must the flags be changed from

CPPFLAGS = -DVERSION=\"${VERSION}\"

to

CPPFLAGS += -DVERSION=\"${VERSION}\"

I’ve looked into google, but don’t see anything there about this. Can someone please explain and tell me where to read more about these flags?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T21:03:32+00:00Added an answer on May 25, 2026 at 9:03 pm

    I did quite a lot of googling and found that this pattern (Surf’s is here) seems fairly common in Arch Linux PKGBUILD files. Another example was in DWM’s PKGBUILD.

    Obviously it is patching the config.mk file so that when make is called, the values are appended to the flags instead of overriding the flags (which must already be set elsewhere). So there must be existing settings that need to be retained. This seems to just be done by default by the package builders so it was hard to find the reason.

    Looking further I found this bug report relating to DWM’s config.mk file, where the author notes that a version of that file was overriding flags set in makepkg.conf which is the main configuration file for makepkg, which allows tuning compilation settings per machine. This seems like a reasonable explanation for what you found. From that page, a default value for CFLAGS would be something like this:

    CFLAGS="-march=x86-64 -mtune=generic -O2 -pipe"
    

    So the patched config.mk file would result in the following when building the package:

    CFLAGS="-march=x86-64 -mtune=generic -O2 -pipe -std=c99 -pedantic -Wall -Os -I. ....."
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using Arch linux and I need to create virtual serial port on
I can't init lua correctly under Arch Linux. Lua - latest version. Here is
I am writing a small application with Qt 4.6 (64-bit Arch Linux, though that
I am using embedded-linux for device which has Arch ARMv5 Speed 266MHZ, vfpu and
Recently I've migrated to Arch Linux, after ~4 years being loyal to Ubuntu. Everything
I am using following versions of Ruby and Rails on arch linux [hardik@sunshine: kandibank
I have to get the Linux distribution name from a Python script. There is
I am on Arch Linux, I just installed JRE and JDK and all the
i try to write a system call. I followed these steps: linux/arch/x86/kernel/syscall_table_32.S ----> .
So I'm running netbeans 7.0-1 using Arch Linux. I'm running xming for my x-server.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.