[SOLVED] Where is make getting these build flags from?
*BSDThis forum is for the discussion of all BSD variants.
FreeBSD, OpenBSD, NetBSD, etc.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Well the -O2 and -pipe are from either the CFLAGS or the COPFLAGS, but there's not enough information to discern where the -fomit-frame-pointer is coming from. Where's the actual Makefile?
Well the -O2 and -pipe are from either the CFLAGS or the COPFLAGS, but there's not enough information to discern where the -fomit-frame-pointer is coming from. Where's the actual Makefile?
Well the 2nd -O2 is actually -02 (zero two), and it's that that is throwing errors while compiling.
What's highlighted in green is coming from /etc/make.conf. What's highlighted in red is what I'm trying to find the source of. It doesn't show up an an environmental variable.
Code:
cc -c -I/usr/local/include -O2 -pipe -fstack-protector -fno-strict-aliasing -02 -pipe -fomit-frame-pointer
-d [-]flags
Turn on debugging, and specify which portions of make are to
print debugging information. Unless the flags are preceded by
`-' they are added to the MAKEFLAGS environment variable and will
be processed by any child make processes. By default, debugging
information is printed to standard error, but this can be changed
using the F debugging flag. The debugging output is always
unbuffered; in addition, if debugging is enabled but debugging
output is not directed to standard output, then the standard
output is line buffered. Flags is one or more of the following:
A Print all possible debugging information; equivalent to
specifying all of the debugging flags.
F[+]filename
Specify where debugging output is written. This must be
the last flag, because it consumes the remainder of the
argument. If the character immediately after the `F'
flag is `+', then the file will be opened in append mode;
otherwise the file will be overwritten. If the file name
is `stdout' or `stderr' then debugging output will be
written to the standard output or standard error output
file descriptors respectively (and the `+' option has no
effect). Otherwise, the output will be written to the
named file. If the file name ends `.%d' then the `%d' is
replaced by the pid.
What's highlighted in red is what I'm trying to find the source of. It doesn't show up an an environmental variable.
If it's not from the environment, it must be from a file. You could use ktrace+kdump to find all the files which are opened, then grep them for the offending string.
I'm assuming you've grep'ed for these variable names within the build hierarchy as well as your home and tools environment? If somewhere there is a DASH-OH-TWO as opposed to DASH-ZERO-TWO then THAT should be relatively easy to find, not in the log file but in a file used by the build to establish variables.
Version of make? Note also that I have gnumake 3.8.1 and it does not contain the -A flag.
Makefile?
The debug output doesn't help here. Once the Makefile is posted, it's likely that there will be other support files requested, there's probably an import or include of information/variables within the make which would cause this.
I also ran a make -d and searched the output for variables being resolved and it showed absolutely nothing on that subject. Therefore I suspect whatever debug you add to make, may not get the job done.
My make version is 20150505 from FREEBSD 11.0-CURRENT
When I upgraded to 11.0-CURRENT, I had wiped out both /usr/src and /usr/ports, and used svn to get the new sources. I haven't modified /etc/make.conf or specified make flags anywhere else after that.
What's weird is that when I make buildworld under /usr/src, those flags aren't there. But when I try to build something under /usr/ports, that's when they show up.
Updated perl5, and now those entries in that file reflect what /etc/make.conf shows. Looks like anytime I edit /etc/make.conf, I'll have to update perl also.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.