Bug 10642 - BUILD_CC and such are missing from variable index
Summary: BUILD_CC and such are missing from variable index
Status: RESOLVED FIXED
Alias: None
Product: Reference
Classification: Documentation
Component: handbook (show other bugs)
Version: unspecified
Hardware: x86 Multiple
: Medium normal
Target Milestone: 2.4
Assignee: Kristi
QA Contact:
URL:
Whiteboard: 31 August 2017: RESOLVED
Depends on:
Blocks:
 
Reported: 2016-11-10 22:27 UTC by Yann Dirson
Modified: 2017-08-31 21:38 UTC (History)
5 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: Done (doc changes complete)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Yann Dirson 2016-11-10 22:27:33 UTC
BUILD_CFLAGS and friends are there, but _CC, _CXX and surely others are not.
Comment 1 Scott Rifenbark 2016-11-11 00:12:56 UTC
Hi,

So I am assuming you mean specifically the BUILD_CC and BUILD_CXX variables.  Can you list the others for me?

Thanks,
Scott
Comment 2 Scott Rifenbark 2016-11-30 00:05:51 UTC
Setting to 2.3 M4.
Comment 3 Randy MacLeod 2017-01-12 16:58:28 UTC
Scott, yes, he means BUILD_CC and BUILD_CXX as described in:

http://lists.openembedded.org/pipermail/openembedded-core/2016-August/125515.html

The full set, based on master as of:
   acce512 selftest/devtool: update test to work with new mtd-utils
is:

$ grep BUILD_ meta/classes/native.bbclass
PACKAGE_ARCH = "${BUILD_ARCH}"
TARGET_ARCH = "${BUILD_ARCH}"
TARGET_OS = "${BUILD_OS}"
TARGET_VENDOR = "${BUILD_VENDOR}"
TARGET_PREFIX = "${BUILD_PREFIX}"
TARGET_CC_ARCH = "${BUILD_CC_ARCH}"
TARGET_LD_ARCH = "${BUILD_LD_ARCH}"
TARGET_AS_ARCH = "${BUILD_AS_ARCH}"
TARGET_CPPFLAGS = "${BUILD_CPPFLAGS}"
TARGET_CFLAGS = "${BUILD_CFLAGS}"
TARGET_CXXFLAGS = "${BUILD_CXXFLAGS}"
TARGET_LDFLAGS = "${BUILD_LDFLAGS}"
HOST_ARCH = "${BUILD_ARCH}"
HOST_OS = "${BUILD_OS}"
HOST_VENDOR = "${BUILD_VENDOR}"
HOST_PREFIX = "${BUILD_PREFIX}"
HOST_CC_ARCH = "${BUILD_CC_ARCH}"
HOST_LD_ARCH = "${BUILD_LD_ARCH}"
HOST_AS_ARCH = "${BUILD_AS_ARCH}"
CPPFLAGS = "${BUILD_CPPFLAGS}"
CFLAGS = "${BUILD_CFLAGS}"
CXXFLAGS = "${BUILD_CXXFLAGS}"
LDFLAGS = "${BUILD_LDFLAGS}"
export CC = "${BUILD_CC}"
export CXX = "${BUILD_CXX}"
export FC = "${BUILD_FC}"
export CPP = "${BUILD_CPP}"
export LD = "${BUILD_LD}"
export CCLD = "${BUILD_CCLD}"
export AR = "${BUILD_AR}"
export AS = "${BUILD_AS}"
export RANLIB = "${BUILD_RANLIB}"
export STRIP = "${BUILD_STRIP}"
export NM = "${BUILD_NM}"

And in case it matters to you here's the exported list:

$ grep BUILD_ meta/classes/native.bbclass | grep export
export CC = "${BUILD_CC}"
export CXX = "${BUILD_CXX}"
export FC = "${BUILD_FC}"
export CPP = "${BUILD_CPP}"
export LD = "${BUILD_LD}"
export CCLD = "${BUILD_CCLD}"
export AR = "${BUILD_AR}"
export AS = "${BUILD_AS}"
export RANLIB = "${BUILD_RANLIB}"
export STRIP = "${BUILD_STRIP}"
export NM = "${BUILD_NM}"


Let me know if you need anything else.

../Randy
Comment 4 Scott Rifenbark 2017-01-18 23:47:47 UTC
Randy, 

Thanks for the grep list.  So, these are currently documented in the YP Reference Manual's Glossary:

BUILD_ARCH
BUILD_CFLAGS
BUILD_PPFLAGS
BUILD_CXXFLAGS
BUILD_LDFLAGS
BUILD_OPTIMIZATOIN
BUILD_OS
BUILD_PREFIX
BUILD_SYS
BUILD_VENDOR

I have a couple questions:

 1. Do we need to document all the variables in the grep list?  In the past, 
    we have made decisions to not document some variables.  Paul Eggleton has
    helped determine these things in the past.

 2. BUILD_OPTIMIZATION and BUILD_SYS are currently documented but did not 
    show up in the grep list.  Are they gone now?
Comment 5 Randy MacLeod 2017-04-20 14:02:17 UTC
1.
I think we can limit the list of variables to document using some judgment.
If we assume that the reader has some development experience, then we don't need to document the _CC, _CXX, _AR, _CPP, _AR, _AS ones if we say that this variable codifies (?) standard Linux compiler and linker tools. I didn't know what _FC was, it's the FORTRAN compiler, so that might be worth pointing out even if we don't really use it very much if at all. It's define as:
   meta/conf/bitbake.conf:export BUILD_FC = "${CCACHE}${BUILD_PREFIX}gfortran ${BUILD_CC_ARCH}"


2.BUILD_OPTIMIZATION is no longer used by meta/classes/native.bbclass, err actually I don't think it ever was. It is still defined in:
   meta/conf/bitbake.conf:BUILD_OPTIMIZATION
as:
   "-O2 -pipe"
so I guess we should document it.

BUILD_SYS is still defined in:
   meta/conf/bitbake.conf
as:
   BUILD_SYS = "${BUILD_ARCH}${BUILD_VENDOR}-${BUILD_OS}"

As you can see in the line above, there are tonnes of BUILD_ variables so
I'd just document some of the ones listed above for 2.3 and we'll see if anyone needs more info.
Comment 6 Scott Rifenbark 2017-04-20 15:29:38 UTC
Thanks Randy, 

I need to make sure I have a good list before doing this.  This is my understanding from your Comment 5:

These three variables need full-blown descriptions.

BUILD_CC_ARCH - Yes
BUILD_LD_ARCH - Yes
BUILD_AS_ARCH - Yes

The following variables of the BUILD_* type are mixed on whether we want them in the manual or not.  

BUILD_CC - No
BUILD_CXX - No
BUILD_FC - Yes
BUILD_CPP - No
BUILD_LD - Yes
BUILD_CCLD - Yes
BUILD_AR - No
BUILD_AS - No
BUILD_RANLIB - Yes
BUILD_STRIP - Yes
BUILD_NM - Yes

Am I getting this right?  

Thanks, 
Scott
Comment 7 Randy MacLeod 2017-04-20 15:57:43 UTC
Hi Scott,

Depending on how you right the entry, I think we can just document one of:
BUILD_RANLIB - Yes
BUILD_STRIP - Yes
BUILD_NM - Yes

So document STRIP and explain that RANLIB and NM are similar wrappers.
Comment 8 Scott Rifenbark 2017-04-26 18:41:35 UTC
Hi Randy, 

So this is the list for the new variables I will add to the glossary:

BUILD_CC_ARCH
BUILD_LD_ARCH
BUILD_AS_ARCH
BUILD_FC 
BUILD_LD 
BUILD_CCLD
BUILD_STRIP (note in the description that BUILD_RANLIB and BUILD_NM are
             similar wrappers)

Probably too late to get these in for the 2.3 M4 build as the 2.3 release is in RC now.  So I am putting the target to 2.4 M1.

Scott
Comment 9 Randy MacLeod 2017-06-29 15:45:34 UTC
Scott, That's fine with me. Thanks.
Comment 10 Kristi 2017-06-29 23:32:14 UTC
Changing owner
Comment 11 Kristi 2017-08-17 23:18:17 UTC
Paul, 

Can you help with baseline descriptions for each? 

BUILD_CC_ARCH
BUILD_LD_ARCH
BUILD_AS_ARCH
BUILD_FC 
BUILD_LD 
BUILD_CCLD
BUILD_STRIP (note in the description that BUILD_RANLIB and BUILD_NM are
             similar wrappers)

Thanks!
Comment 12 Paul Eggleton 2017-08-17 23:55:50 UTC
OK, here are some descriptions:


BUILD_CC_ARCH

Specifies architecture-specific C compiler flags for the build host. By default this variable's value is empty.


BUILD_LD_ARCH

Specifies architecture-specific linker flags for the build host. By default this variable's value is empty.


BUILD_AS_ARCH

Specifies architecture-specific assembler flags for the build host. By default this variable's value is empty.


BUILD_FC 

Specifies the Fortran compiler command for the build host. By default this points to gfortran with BUILD_CC_ARCH (if set) passed as arguments.


BUILD_LD

Specifies the linker command for the build host. By default this points to ld with BUILD_LD_ARCH (if set) passed as arguments.


BUILD_CCLD

Specifies the linker command to be used for the build host when the C compiler is being used as the linker. By default this points to gcc with BUILD_CC_ARCH (if set) passed as arguments.


BUILD_STRIP

Specifies the command to be used to strip debugging symbols from binaries produced for the build host. By default this points to strip.
Comment 14 Paul Eggleton 2017-08-30 04:49:48 UTC
Those look OK to me, thanks.
Comment 15 Kristi 2017-08-31 21:38:34 UTC
Thanks Paul! Setting status to RESOLVED and putting the doc flag to "Done".