LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 04-05-2020, 05:30 PM   #1
andrew.46
Senior Member
 
Registered: Oct 2007
Distribution: Slackware
Posts: 1,138

Rep: Reputation: 327Reputation: 327Reputation: 327Reputation: 327
exhale: CPPFLAGS and SlackBuild...


I have created a SlackBuild for the new xHE-AAC encoder exhale. Builds and runs fine but I have a small area of concern with compiler flags that I was hoping for some input on. With the script at the moment I have left the CPPFLAGS as specified in the source makefile (well one of the several daisy-chained makefiles actually!) which is seen in src/makefile.base.

Would a better script actually sed these out and place the SlackBuilds 'boiler-plate' options there? I confess that I am leaning towards leaving the CPPFLAGS as they are but I was keen for more experienced users to weigh in. And I guess with the CPPFLAGS non-standard would this ever be acceptable on SBo?
 
Old 04-06-2020, 02:39 AM   #2
TheRealGrogan
Member
 
Registered: Oct 2010
Location: Ontario, Canada
Distribution: Slackware, LFS, Manjaro (for gaming)
Posts: 394

Rep: Reputation: 255Reputation: 255Reputation: 255
CPPFLAGS != CFLAGS/CXXFLAGS

A .SlackBuild wouldn't set CPPFLAGS unless there was a good reason to (e.g. a project's build system not finding includes)

I presume it's that comment paragraph in the SlackBuild... it's possibly a typo (maybe didn't mean to say CPPFLAGS)

P.S. Slackware has been doing "-O2 -fPIC" for 64 bit CFLAGS and CXXFLAGS for a long time now. The -O2 is probably default in most builds anyway, and it's not usually necessary to pass -fPIC to everything anymore, it's just a catch-all. IMO it was necessary back in early x86_64 days when 64 bit builds weren't all passing it when necessary, resulting in broken libraries. It wasn't always necessary in the 32 bit days to have libraries built with -fPIC.

The bottom line is, you probably don't need to be concerned with leaving things at their default in that build.

P.P.S. Sorry, didn't realize that was your SlackBuild. Simply add the SLKCFLAGS and use them in CFLAGS and/or CXXFLAGS variables if you wish to, and leave the CPPFLAGS in the Makefiles alone.

Also, meant to say that it's safe to pass -fPIC to everything on that arch as even if the compiler uses it where unnecessary/inappropriate there is no penalty for doing so on x86_64

Last edited by TheRealGrogan; 04-06-2020 at 03:09 AM.
 
1 members found this post helpful.
Old 04-06-2020, 06:37 PM   #3
andrew.46
Senior Member
 
Registered: Oct 2007
Distribution: Slackware
Posts: 1,138

Original Poster
Rep: Reputation: 327Reputation: 327Reputation: 327Reputation: 327
Thanks, this makes things much clearer
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] sbopkg installs "original" SlackBuild to /usr/doc/<pkg>/ instead of "local" SlackBuild drumz Slackware 29 01-20-2018 12:12 AM
[Patch and SlackBuild] Grub-2.02~beta2 SlackBuild and Patch. ReaperX7 Slackware 3 01-28-2015 09:30 AM
XBMC 11 Slackbuild for Slack 14.0, and the HULU and FreeCable addons croxen Slackware 0 10-25-2012 07:24 PM
Compiling qt and KDE 3.5.5 using Pat,s Slackbuild Harp00 Slackware 3 10-13-2006 04:48 AM
Slackbuild and Patches stormtracknole Slackware 4 03-30-2006 08:12 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 07:56 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration