LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > *BSD
User Name
Password
*BSD This forum is for the discussion of all BSD variants.
FreeBSD, OpenBSD, NetBSD, etc.

Notices


Reply
  Search this Thread
Old 05-11-2015, 07:43 PM   #1
replica9000
Senior Member
 
Registered: Jul 2006
Distribution: Debian Unstable
Posts: 1,130
Blog Entries: 2

Rep: Reputation: 260Reputation: 260Reputation: 260
Where is make getting these build flags from?


Code:
root@FreeVBox:/usr/ports/ftp/gftp # cat /etc/make.conf
CFLAGS=-O2 -pipe
COPFLAGS=-O2 -pipe
OPTIMIZED_FLAGS=YES
WITH_OPTIMIZED_FLAGS=YES
BUILD_OPTIMIZED=YES
MAKE_JOBS_NUMBER=4
MAKE_JOBS_SAFE=YES
Code:
root@FreeVBox:/usr/ports/ftp/gftp # make -dAF/tmp/gftp
Code:
root@FreeVBox:/usr/ports/ftp/gftp # cat /tmp/gftp | grep fomit
Command:OPTIMIZE = -02 -pipe -fomit-frame-pointer
ParseReadLine (265): 'OPTIMIZE = -02 -pipe -fomit-frame-pointer'
Global:OPTIMIZE = -02 -pipe -fomit-frame-pointer ignored!
Applying[OPTIMIZE] :Q to "-02 -pipe -fomit-frame-pointer"
QuoteMeta: [-02\ -pipe\ -fomit-frame-pointer]
Result[OPTIMIZE] of :Q is "-02\ -pipe\ -fomit-frame-pointer"
Result[.MAKEOVERRIDES] of :@ is ".MAKE.LEVEL.ENV=MAKELEVEL ARCH=amd64 CONFIG_DONE_GFTP=1 LIBPERL_A=libperl.a LINKTYPE=dynamic OPSYS=FreeBSD OPTIMIZE=-02\ -pipe\ -fomit-frame-pointer OSREL=11.0 OSVERSION=1100073 PREFIX=/usr/local SYSTEMVERSION="
OPTIMIZE         = -02 -pipe -fomit-frame-pointer
OPTIMIZE         = -02 -pipe -fomit-frame-pointer
cc -c  -I/usr/local/include  -O2 -pipe  -fstack-protector -fno-strict-aliasing -02 -pipe -fomit-frame-pointer    -DVERSION=\"2.41\"  -DXS_VERSION=\"2.41\" -DPIC -fPIC "-I/usr/local/lib/perl5/5.16/mach/CORE"   Expat.c
OPTIMIZE         = -02 -pipe -fomit-frame-pointer
OPTIMIZE         = -02 -pipe -fomit-frame-pointer
 
Old 05-12-2015, 12:50 PM   #2
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,883
Blog Entries: 13

Rep: Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930
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?
 
Old 05-12-2015, 03:16 PM   #3
replica9000
Senior Member
 
Registered: Jul 2006
Distribution: Debian Unstable
Posts: 1,130

Original Poster
Blog Entries: 2

Rep: Reputation: 260Reputation: 260Reputation: 260
Quote:
Originally Posted by rtmistler View Post
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
 
Old 05-12-2015, 03:29 PM   #4
ntubski
Senior Member
 
Registered: Nov 2005
Distribution: Debian, Arch
Posts: 3,784

Rep: Reputation: 2083Reputation: 2083Reputation: 2083Reputation: 2083Reputation: 2083Reputation: 2083Reputation: 2083Reputation: 2083Reputation: 2083Reputation: 2083Reputation: 2083
Quote:
Originally Posted by replica9000 View Post
Code:
root@FreeVBox:/usr/ports/ftp/gftp # make -dAF/tmp/gftp
What do the options A and F do? I don't see them in the GNU make manual, nor the FreeBSD one.

EDIT: oops, it's actually under the -d (debug) flag in the BSD one.

Quote:
Originally Posted by rtmistler
Where's the actual Makefile?
Seconded.

Last edited by ntubski; 05-12-2015 at 07:19 PM. Reason: note flags are in BSD manual
 
Old 05-12-2015, 04:15 PM   #5
replica9000
Senior Member
 
Registered: Jul 2006
Distribution: Debian Unstable
Posts: 1,130

Original Poster
Blog Entries: 2

Rep: Reputation: 260Reputation: 260Reputation: 260
Quote:
Originally Posted by rtmistler View Post
Where's the actual Makefile?
It's not just one Makefile. This error has popped up under multiple sources under /usr/ports.

Quote:
Originally Posted by ntubski View Post
What do the options A and F do? I don't see them in the GNU make manual, nor the FreeBSD one.
I got the info from man make

Code:
-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.
 
Old 05-12-2015, 08:02 PM   #6
ntubski
Senior Member
 
Registered: Nov 2005
Distribution: Debian, Arch
Posts: 3,784

Rep: Reputation: 2083Reputation: 2083Reputation: 2083Reputation: 2083Reputation: 2083Reputation: 2083Reputation: 2083Reputation: 2083Reputation: 2083Reputation: 2083Reputation: 2083
Quote:
Originally Posted by replica9000 View Post
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.
 
Old 05-12-2015, 08:03 PM   #7
replica9000
Senior Member
 
Registered: Jul 2006
Distribution: Debian Unstable
Posts: 1,130

Original Poster
Blog Entries: 2

Rep: Reputation: 260Reputation: 260Reputation: 260
Where does make get the OPTIMIZE value from?

Code:
% cat /tmp/gftp | grep OPTIMIZE
Global:delete OPTIMIZE (not found)
Command:OPTIMIZE = -02 -pipe -fomit-frame-pointer
Global:.MAKEOVERRIDES =  .MAKE.LEVEL.ENV .MAKE.LEVEL.ENV ARCH CONFIG_DONE_GFTP OPSYS OSREL OSVERSION SYSTEMVERSION LIBPERL_A LINKTYPE OPTIMIZE
Global:.MAKEOVERRIDES =  .MAKE.LEVEL.ENV .MAKE.LEVEL.ENV ARCH CONFIG_DONE_GFTP OPSYS OSREL OSVERSION SYSTEMVERSION LIBPERL_A LINKTYPE OPTIMIZE PREFIX
ParseReadLine (3): 'OPTIMIZED_FLAGS=YES'
Global:OPTIMIZED_FLAGS = YES
ParseReadLine (4): 'WITH_OPTIMIZED_FLAGS=YES'
Global:WITH_OPTIMIZED_FLAGS = YES
ParseReadLine (265): 'OPTIMIZE = -02 -pipe -fomit-frame-pointer'
Global:OPTIMIZE = -02 -pipe -fomit-frame-pointer ignored!
ParseReadLine (285): 'CCCMD = $(CC) -c $(PASTHRU_INC) $(INC)  $(CCFLAGS) $(OPTIMIZE)  $(PERLTYPE) $(MPOLLUTE) $(DEFINE_VERSION)  $(XS_DEFINE_VERSION)'
Global:CCCMD = $(CC) -c $(PASTHRU_INC) $(INC)  $(CCFLAGS) $(OPTIMIZE)  $(PERLTYPE) $(MPOLLUTE) $(DEFINE_VERSION)  $(XS_DEFINE_VERSION)
ParseReadLine (296): 'PASTHRU = LIBPERL_A="$(LIBPERL_A)" LINKTYPE="$(LINKTYPE)" OPTIMIZE="$(OPTIMIZE)" PREFIX="$(PREFIX)" PASTHRU_INC="$(PASTHRU_INC)"'
Global:PASTHRU = LIBPERL_A="$(LIBPERL_A)" LINKTYPE="$(LINKTYPE)" OPTIMIZE="$(OPTIMIZE)" PREFIX="$(PREFIX)" PASTHRU_INC="$(PASTHRU_INC)"
ParseReadLine (312): '	cc -E -c $(PASTHRU_INC) $(INC)  $(CCFLAGS) $(OPTIMIZE)  $(PERLTYPE) $(MPOLLUTE) $(DEFINE_VERSION)  $(XS_DEFINE_VERSION) $(CCCDLFLAGS) "-I$(PERL_INC)" $(PASTHRU_DEFINE) $(DEFINE) $*.c > $*.i'
Applying[.MAKEOVERRIDES] :O to " .MAKE.LEVEL.ENV .MAKE.LEVEL.ENV ARCH CONFIG_DONE_GFTP OPSYS OSREL OSVERSION SYSTEMVERSION LIBPERL_A LINKTYPE OPTIMIZE PREFIX"
Result[.MAKEOVERRIDES] of :O is ".MAKE.LEVEL.ENV .MAKE.LEVEL.ENV ARCH CONFIG_DONE_GFTP LIBPERL_A LINKTYPE OPSYS OPTIMIZE OSREL OSVERSION PREFIX SYSTEMVERSION"
Applying[.MAKEOVERRIDES] :u to ".MAKE.LEVEL.ENV .MAKE.LEVEL.ENV ARCH CONFIG_DONE_GFTP LIBPERL_A LINKTYPE OPSYS OPTIMIZE OSREL OSVERSION PREFIX SYSTEMVERSION"
Result[.MAKEOVERRIDES] of :u is ".MAKE.LEVEL.ENV ARCH CONFIG_DONE_GFTP LIBPERL_A LINKTYPE OPSYS OPTIMIZE OSREL OSVERSION PREFIX SYSTEMVERSION"
Applying[.MAKEOVERRIDES] :@ to ".MAKE.LEVEL.ENV ARCH CONFIG_DONE_GFTP LIBPERL_A LINKTYPE OPSYS OPTIMIZE OSREL OSVERSION PREFIX SYSTEMVERSION"
Command:v = OPTIMIZE
Applying[OPTIMIZE] :Q to "-02 -pipe -fomit-frame-pointer"
Result[OPTIMIZE] of :Q is "-02\ -pipe\ -fomit-frame-pointer"
Result[.MAKEOVERRIDES] of :@ is ".MAKE.LEVEL.ENV=MAKELEVEL ARCH=amd64 CONFIG_DONE_GFTP=1 LIBPERL_A=libperl.a LINKTYPE=dynamic OPSYS=FreeBSD OPTIMIZE=-02\ -pipe\ -fomit-frame-pointer OSREL=11.0 OSVERSION=1100073 PREFIX=/usr/local SYSTEMVERSION="
OPTIMIZED_FLAGS  = YES
WITH_OPTIMIZED_FLAGS = YES
PASTHRU          = LIBPERL_A="$(LIBPERL_A)" LINKTYPE="$(LINKTYPE)" OPTIMIZE="$(OPTIMIZE)" PREFIX="$(PREFIX)" PASTHRU_INC="$(PASTHRU_INC)"
CCCMD            = $(CC) -c $(PASTHRU_INC) $(INC)  $(CCFLAGS) $(OPTIMIZE)  $(PERLTYPE) $(MPOLLUTE) $(DEFINE_VERSION)  $(XS_DEFINE_VERSION)
.MAKEOVERRIDES   =  .MAKE.LEVEL.ENV .MAKE.LEVEL.ENV ARCH CONFIG_DONE_GFTP OPSYS OSREL OSVERSION SYSTEMVERSION LIBPERL_A LINKTYPE OPTIMIZE PREFIX
OPTIMIZE         = -02 -pipe -fomit-frame-pointer
	cc -E -c $(PASTHRU_INC) $(INC)  $(CCFLAGS) $(OPTIMIZE)  $(PERLTYPE) $(MPOLLUTE) $(DEFINE_VERSION)  $(XS_DEFINE_VERSION) $(CCCDLFLAGS) "-I$(PERL_INC)" $(PASTHRU_DEFINE) $(DEFINE) $*.c > $*.i
OPTIMIZED_FLAGS  = YES
WITH_OPTIMIZED_FLAGS = YES
PASTHRU          = LIBPERL_A="$(LIBPERL_A)" LINKTYPE="$(LINKTYPE)" OPTIMIZE="$(OPTIMIZE)" PREFIX="$(PREFIX)" PASTHRU_INC="$(PASTHRU_INC)"
CCCMD            = $(CC) -c $(PASTHRU_INC) $(INC)  $(CCFLAGS) $(OPTIMIZE)  $(PERLTYPE) $(MPOLLUTE) $(DEFINE_VERSION)  $(XS_DEFINE_VERSION)
.MAKEOVERRIDES   =  .MAKE.LEVEL.ENV .MAKE.LEVEL.ENV ARCH CONFIG_DONE_GFTP OPSYS OSREL OSVERSION SYSTEMVERSION LIBPERL_A LINKTYPE OPTIMIZE PREFIX
OPTIMIZE         = -02 -pipe -fomit-frame-pointer
	cc -E -c $(PASTHRU_INC) $(INC)  $(CCFLAGS) $(OPTIMIZE)  $(PERLTYPE) $(MPOLLUTE) $(DEFINE_VERSION)  $(XS_DEFINE_VERSION) $(CCCDLFLAGS) "-I$(PERL_INC)" $(PASTHRU_DEFINE) $(DEFINE) $*.c > $*.i
OPTIMIZED_FLAGS  = YES
WITH_OPTIMIZED_FLAGS = YES
PASTHRU          = LIBPERL_A="$(LIBPERL_A)" LINKTYPE="$(LINKTYPE)" OPTIMIZE="$(OPTIMIZE)" PREFIX="$(PREFIX)" PASTHRU_INC="$(PASTHRU_INC)"
CCCMD            = $(CC) -c $(PASTHRU_INC) $(INC)  $(CCFLAGS) $(OPTIMIZE)  $(PERLTYPE) $(MPOLLUTE) $(DEFINE_VERSION)  $(XS_DEFINE_VERSION)
.MAKEOVERRIDES   =  .MAKE.LEVEL.ENV .MAKE.LEVEL.ENV ARCH CONFIG_DONE_GFTP OPSYS OSREL OSVERSION SYSTEMVERSION LIBPERL_A LINKTYPE OPTIMIZE PREFIX
OPTIMIZE         = -02 -pipe -fomit-frame-pointer
	cc -E -c $(PASTHRU_INC) $(INC)  $(CCFLAGS) $(OPTIMIZE)  $(PERLTYPE) $(MPOLLUTE) $(DEFINE_VERSION)  $(XS_DEFINE_VERSION) $(CCCDLFLAGS) "-I$(PERL_INC)" $(PASTHRU_DEFINE) $(DEFINE) $*.c > $*.i
OPTIMIZED_FLAGS  = YES
WITH_OPTIMIZED_FLAGS = YES
PASTHRU          = LIBPERL_A="$(LIBPERL_A)" LINKTYPE="$(LINKTYPE)" OPTIMIZE="$(OPTIMIZE)" PREFIX="$(PREFIX)"
CCCMD            = $(CC) -c $(PASTHRU_INC) $(INC)  $(CCFLAGS) $(OPTIMIZE)  $(PERLTYPE) $(MPOLLUTE) $(DEFINE_VERSION)  $(XS_DEFINE_VERSION)
OPTIMIZE         = -02 -pipe -fomit-frame-pointer
	cc -E -c $(PASTHRU_INC) $(INC)  $(CCFLAGS) $(OPTIMIZE)  $(PERLTYPE) $(MPOLLUTE) $(DEFINE_VERSION)  $(XS_DEFINE_VERSION) $(CCCDLFLAGS) "-I$(PERL_INC)" $(PASTHRU_DEFINE) $(DEFINE) $*.c > $*.i
 
Old 05-13-2015, 07:18 AM   #8
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,883
Blog Entries: 13

Rep: Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930
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.
 
Old 05-13-2015, 11:04 AM   #9
replica9000
Senior Member
 
Registered: Jul 2006
Distribution: Debian Unstable
Posts: 1,130

Original Poster
Blog Entries: 2

Rep: Reputation: 260Reputation: 260Reputation: 260
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.
 
Old 05-13-2015, 12:13 PM   #10
replica9000
Senior Member
 
Registered: Jul 2006
Distribution: Debian Unstable
Posts: 1,130

Original Poster
Blog Entries: 2

Rep: Reputation: 260Reputation: 260Reputation: 260
Found it!

Code:
# grep -r '02 -pipe -fomit' /usr
/usr/local/lib/perl5/5.16/mach/Config_heavy.pl:config_arg19='-Doptimize=-02 -pipe -fomit-frame-pointer'
/usr/local/lib/perl5/5.16/mach/Config_heavy.pl:config_args='-sde -Dprefix=/usr/local -Darchlib=/usr/local/lib/perl5/5.16/mach -Dprivlib=/usr/local/lib/perl5/5.16 -Dman3dir=/usr/local/lib/perl5/5.16/perl/man/man3 -Dman1dir=/usr/local/man/man1 -Dsitearch=/usr/local/lib/perl5/site_perl/5.16/mach -Dsitelib=/usr/local/lib/perl5/site_perl/5.16 -Dscriptdir=/usr/local/bin -Dsiteman3dir=/usr/local/lib/perl5/5.16/man/man3 -Dsiteman1dir=/usr/local/man/man1 -Ui_malloc -Ui_iconv -Uinstallusrbinperl -Dcc=cc -Duseshrplib -Dinc_version_list=none -Dccflags=-DAPPLLIB_EXP="/usr/local/lib/perl5/5.16/BSDPAN" -Doptimize=-02 -pipe -fomit-frame-pointer -Ui_gdbm -Dusethreads=y -Dusemymalloc=n -Duse64bitint'
/usr/local/lib/perl5/5.16/mach/Config_heavy.pl:optimize='-02 -pipe -fomit-frame-pointer'
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.
 
  


Reply



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
make and make install with flags question Keith Hedger Programming 6 02-03-2015 11:03 AM
[SOLVED] want to make multiple flags in script? stetas Linux - Newbie 4 11-16-2014 10:54 AM
[SOLVED] Chmod it's flags and how to use it to make a script executable Ztcoracat Linux - General 12 06-25-2014 09:22 PM
When apt-get source'ing .. can I pass make flags? AlucardZero Debian 2 06-08-2008 09:58 AM

LinuxQuestions.org > Forums > Other *NIX Forums > *BSD

All times are GMT -5. The time now is 07:14 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