how -> common.mk to use -gdwarf-2?

Hi…

  1. Which macro do I have to set or modify so that the o.g variant would
    get compiled with -gdwarf-2 instead than with the default -g (see
    bellow)??

make[3]: Entering directory
`/home/saic/src/chps/bmsd/server/nto/x86/o.g’
QCC -Vgcc_ntox86 -c -Wc,-Wall -Wc,-Wno-parentheses -O -I.
-I/home/saic/src/chps/bmsd/server/nto/x86/o -I/home/
saic/src/chps/bmsd/server/nto/x86/o.g
-I/home/saic/src/chps/bmsd/server/nto/x86
-I/home/saic/src/chps/bmsd/server/
nto -I/home/saic/src/chps/bmsd/server -I/home/saic/src/chps/bmsd/src
-I/home/saic/src/chps/bmsd/include -I/home/sa
ic/src/common/include -I/usr/include -g -DVARIANT_g
/home/saic/src/chps/bmsd/src/SAICbms.cc

  1. What would I have to do I have to do to suppress the following
    warnings??

In file included from /usr/include/fstream.h:4,
from /home/saic/src/common/include/SAICCommonCpp.h:94,
from /home/saic/src/common/include/SAICtypes.h:34,
from /home/saic/src/common/include/SAICmsg.h:30,
from /home/saic/src/chps/bmsd/include/SAICbms.h:33,
from /home/saic/src/chps/bmsd/src/SAICbms.cc:32:
/usr/include/fstream: In method
std::basic_filebuf<_Elem,_Traits>::basic_filebuf(_Filet * = 0)': /usr/include/fstream:89: warning: base initializer for std::basic_streambuf<_Elem,_Traits>’
/usr/include/fstream:89: warning: will be re-ordered to precede
member initializations
/usr/include/fstream: In method
std::basic_filebuf<_Elem,_Traits>::basic_filebuf(std::_Uninitialized)': /usr/include/fstream:98: warning: base initializer for std::basic_streambuf<_Elem,_Traits>’
/usr/include/fstream:98: warning: will be re-ordered to precede
member initializations


Thanks.

Best Regards…

Miguel.

my opinions are mine, only mine, solely mine, and they are not related
in any possible way to the institution(s) in which I study and work.

Miguel Simon
Research Engineer
School of Aerospace and Mechanical Engineering
University of Oklahoma
http://www.amerobotics.ou.edu/
http://www.saic.com

Miguel Simon <simon@ou.edu> wrote:

Hi…

  1. Which macro do I have to set or modify so that the o.g variant would
    get compiled with -gdwarf-2 instead than with the default -g (see
    bellow)??

You can do it from the command line ie. “make VFLAG_g=-gdwarf-2”, or you
can add this to your common.mk

make[3]: Entering directory
`/home/saic/src/chps/bmsd/server/nto/x86/o.g’
QCC -Vgcc_ntox86 -c -Wc,-Wall -Wc,-Wno-parentheses -O -I.
-I/home/saic/src/chps/bmsd/server/nto/x86/o -I/home/
saic/src/chps/bmsd/server/nto/x86/o.g
-I/home/saic/src/chps/bmsd/server/nto/x86
-I/home/saic/src/chps/bmsd/server/
nto -I/home/saic/src/chps/bmsd/server -I/home/saic/src/chps/bmsd/src
-I/home/saic/src/chps/bmsd/include -I/home/sa
ic/src/common/include -I/usr/include -g -DVARIANT_g
/home/saic/src/chps/bmsd/src/SAICbms.cc

  1. What would I have to do I have to do to suppress the following
    warnings??

In file included from /usr/include/fstream.h:4,
from /home/saic/src/common/include/SAICCommonCpp.h:94,
from /home/saic/src/common/include/SAICtypes.h:34,
from /home/saic/src/common/include/SAICmsg.h:30,
from /home/saic/src/chps/bmsd/include/SAICbms.h:33,
from /home/saic/src/chps/bmsd/src/SAICbms.cc:32:
/usr/include/fstream: In method
std::basic_filebuf<_Elem,_Traits>::basic_filebuf(_Filet * = 0)': /usr/include/fstream:89: warning: base initializer for std::basic_streambuf<_Elem,_Traits>’
/usr/include/fstream:89: warning: will be re-ordered to precede
member initializations
/usr/include/fstream: In method
std::basic_filebuf<_Elem,_Traits>::basic_filebuf(std::_Uninitialized)': /usr/include/fstream:98: warning: base initializer for std::basic_streambuf<_Elem,_Traits>’
/usr/include/fstream:98: warning: will be re-ordered to precede
member initializations

-Wno-reorder flag.

Best Regards,

Marcin


Thanks.

Best Regards…

Miguel.

my opinions are mine, only mine, solely mine, and they are not related
in any possible way to the institution(s) in which I study and work.

Miguel Simon
Research Engineer
School of Aerospace and Mechanical Engineering
University of Oklahoma
http://www.amerobotics.ou.edu/
http://www.saic.com

Tools Mail Account <tools@qnx.com> wrote:

Miguel Simon <> simon@ou.edu> > wrote:
Hi…

  1. Which macro do I have to set or modify so that the o.g variant would
    get compiled with -gdwarf-2 instead than with the default -g (see
    bellow)??

You can do it from the command line ie. “make VFLAG_g=-gdwarf-2”, or you
can add this to your common.mk

Adding VFLAG_g does not seem to work if added in common.mk
Is there a particular position where to use it? (before/after recurse.mk?)

Adding it in the command line instead works


Wave++

Wave++ <wavexx@apexmail.com> wrote:

Tools Mail Account <> tools@qnx.com> > wrote:
Miguel Simon <> simon@ou.edu> > wrote:
Hi…

  1. Which macro do I have to set or modify so that the o.g variant would
    get compiled with -gdwarf-2 instead than with the default -g (see
    bellow)??

You can do it from the command line ie. “make VFLAG_g=-gdwarf-2”, or you
can add this to your common.mk

Adding VFLAG_g does not seem to work if added in common.mk
Is there a particular position where to use it? (before/after recurse.mk?)

The proto-typical common.mk file looks like this:

ifndef QCONFIG
QCONFIG=qconfig.mk
endif
include $(QCONFIG)

Preset make macros go here

include $(MKFILES_ROOT)/qtargets.mk

Post-set make macros go here

You should be able to override a VFLAG_g=-gdwarf-2 in the Post-set make
macros section.

Best Regards,

Marcin



Adding it in the command line instead works


Wave++

Hi Marcin…

Great.

Any clues/pointers about when to set or overide a flag in the preset vs.
post-set macro? I guess that I can go and look into the several include
files, but I wonder if there is any easy/obvious way to tell? Practice
I suppose?

Thanks…

Miguel.

Tools Mail Account wrote:

Wave++ <> wavexx@apexmail.com> > wrote:
Tools Mail Account <> tools@qnx.com> > wrote:
Miguel Simon <> simon@ou.edu> > wrote:
Hi…

  1. Which macro do I have to set or modify so that the o.g variant would
    get compiled with -gdwarf-2 instead than with the default -g (see
    bellow)??

You can do it from the command line ie. “make VFLAG_g=-gdwarf-2”, or you
can add this to your common.mk

Adding VFLAG_g does not seem to work if added in common.mk
Is there a particular position where to use it? (before/after recurse.mk?)

The proto-typical common.mk file looks like this:

ifndef QCONFIG
QCONFIG=qconfig.mk
endif
include $(QCONFIG)

Preset make macros go here

include $(MKFILES_ROOT)/qtargets.mk

Post-set make macros go here

You should be able to override a VFLAG_g=-gdwarf-2 in the Post-set make
macros section.

Best Regards,

Marcin

Adding it in the command line instead works


Wave++

my opinions are mine, only mine, solely mine, and they are not related
in any possible way to the institution(s) in which I study and work.

Miguel Simon
Research Engineer
School of Aerospace and Mechanical Engineering
University of Oklahoma
http://www.amerobotics.ou.edu/
http://www.saic.com

Miguel Simon <simon@ou.edu> wrote:

Hello,

The appendix B of the Programmers guide is taking about it, you can find
it in your helpviewer or on line at:

http://qdn.qnx.com/support/docs/neutrino_2.11_en/prog/make_convent.htm

Regards,

Marcin

Hi Marcin…

Great.

Any clues/pointers about when to set or overide a flag in the preset vs.
post-set macro? I guess that I can go and look into the several include
files, but I wonder if there is any easy/obvious way to tell? Practice
I suppose?

Thanks…

Miguel.

Tools Mail Account wrote:

Wave++ <> wavexx@apexmail.com> > wrote:
Tools Mail Account <> tools@qnx.com> > wrote:
Miguel Simon <> simon@ou.edu> > wrote:
Hi…

  1. Which macro do I have to set or modify so that the o.g variant would
    get compiled with -gdwarf-2 instead than with the default -g (see
    bellow)??

You can do it from the command line ie. “make VFLAG_g=-gdwarf-2”, or you
can add this to your common.mk

Adding VFLAG_g does not seem to work if added in common.mk
Is there a particular position where to use it? (before/after recurse.mk?)

The proto-typical common.mk file looks like this:

ifndef QCONFIG
QCONFIG=qconfig.mk
endif
include $(QCONFIG)

Preset make macros go here

include $(MKFILES_ROOT)/qtargets.mk

Post-set make macros go here

You should be able to override a VFLAG_g=-gdwarf-2 in the Post-set make
macros section.

Best Regards,

Marcin

Adding it in the command line instead works


Wave++

my opinions are mine, only mine, solely mine, and they are not related
in any possible way to the institution(s) in which I study and work.

Miguel Simon
Research Engineer
School of Aerospace and Mechanical Engineering
University of Oklahoma
http://www.amerobotics.ou.edu/
http://www.saic.com

********** 2002 FIFA World Cup Korea/Japan ************

Miguel Simon a écrit :

Hi…

  1. Which macro do I have to set or modify so that the o.g variant would
    get compiled with -gdwarf-2 instead than with the default -g (see
    bellow)??

make[3]: Entering directory
`/home/saic/src/chps/bmsd/server/nto/x86/o.g’
QCC -Vgcc_ntox86 -c -Wc,-Wall -Wc,-Wno-parentheses -O -I.
-I/home/saic/src/chps/bmsd/server/nto/x86/o -I/home/
saic/src/chps/bmsd/server/nto/x86/o.g
-I/home/saic/src/chps/bmsd/server/nto/x86
-I/home/saic/src/chps/bmsd/server/
nto -I/home/saic/src/chps/bmsd/server -I/home/saic/src/chps/bmsd/src
-I/home/saic/src/chps/bmsd/include -I/home/sa
ic/src/common/include -I/usr/include -g -DVARIANT_g
/home/saic/src/chps/bmsd/src/SAICbms.cc

  1. What would I have to do I have to do to suppress the following
    warnings??

In file included from /usr/include/fstream.h:4,
from /home/saic/src/common/include/SAICCommonCpp.h:94,
from /home/saic/src/common/include/SAICtypes.h:34,
from /home/saic/src/common/include/SAICmsg.h:30,
from /home/saic/src/chps/bmsd/include/SAICbms.h:33,
from /home/saic/src/chps/bmsd/src/SAICbms.cc:32:
/usr/include/fstream: In method
std::basic_filebuf<_Elem,_Traits>::basic_filebuf(_Filet * = 0)': /usr/include/fstream:89: warning: base initializer for std::basic_streambuf<_Elem,_Traits>’
/usr/include/fstream:89: warning: will be re-ordered to precede
member initializations
/usr/include/fstream: In method
std::basic_filebuf<_Elem,_Traits>::basic_filebuf(std::_Uninitialized)': /usr/include/fstream:98: warning: base initializer for std::basic_streambuf<_Elem,_Traits>’
/usr/include/fstream:98: warning: will be re-ordered to precede
member initializations

Thanks.

Best Regards…

Miguel.

my opinions are mine, only mine, solely mine, and they are not related
in any possible way to the institution(s) in which I study and work.

Miguel Simon
Research Engineer
School of Aerospace and Mechanical Engineering
University of Oklahoma
http://www.amerobotics.ou.edu/
http://www.saic.com

You can change it in /usr/include/mk/qmacros.mk, line 122.
So, If it’s defined in qmacros.mk, in your commonk.mk you may change it
after include qmacros.mk because there is no test on a previous definition.

Regards,
Alain.

Hi…

Yup. As you say here and also Marcin said in a previous post:

“You should be able to override a VFLAG_g=-gdwarf-2 in the Post-set make
macros section.”

This works. :slight_smile: Thanks Marcin and Alain.

The Nto way for ‘make’ to work, with all the file structure and such, is
wonderful. Now, any pointers on how to port this capability to
Linux??

Regards…

Miguel.

Alain Bonnefoy wrote:

You can change it in /usr/include/mk/qmacros.mk, line 122.
So, If it’s defined in qmacros.mk, in your commonk.mk you may change it
after include qmacros.mk because there is no test on a previous definition.

Regards,
Alain.

my opinions are mine, only mine, solely mine, and they are not related
in any possible way to the institution(s) in which I study and work.

Miguel Simon
Research Engineer
School of Aerospace and Mechanical Engineering
University of Oklahoma
http://www.amerobotics.ou.edu/
http://www.saic.com

Miguel Simon a écrit :

Hi…

Yup. As you say here and also Marcin said in a previous post:

“You should be able to override a VFLAG_g=-gdwarf-2 in the Post-set make
macros section.”

This works. > :slight_smile: > Thanks Marcin and Alain.

The Nto way for ‘make’ to work, with all the file structure and such, is
wonderful. Now, any pointers on how to port this capability to
Linux??

Regards…

Miguel.

Alain Bonnefoy wrote:

You can change it in /usr/include/mk/qmacros.mk, line 122.
So, If it’s defined in qmacros.mk, in your commonk.mk you may change it
after include qmacros.mk because there is no test on a previous definition.

Regards,
Alain.

my opinions are mine, only mine, solely mine, and they are not related
in any possible way to the institution(s) in which I study and work.

Miguel Simon
Research Engineer
School of Aerospace and Mechanical Engineering
University of Oklahoma
http://www.amerobotics.ou.edu/
http://www.saic.com

Why do you use gdwarf-2?
I heard talking that gstabs is better !?
Do you have any opinion?
Thanks,
Alain.

Hi Alain…

-gdwarf-2 creates more compact (and efficient?) debug code which I need
for debugging my embedded systems…

Regards…

Miguel.


Alain Bonnefoy wrote:

Why do you use gdwarf-2?
I heard talking that gstabs is better !?



Do you have any opinion?
Thanks,
Alain.

my opinions are mine, only mine, solely mine, and they are not related
in any possible way to the institution(s) in which I study and work.

Miguel Simon
Research Engineer
School of Aerospace and Mechanical Engineering
University of Oklahoma
http://www.amerobotics.ou.edu/
http://www.saic.com