Return-Path: Received: from BAY004-OMC3S15.hotmail.com (bay004-omc3s15.hotmail.com [65.54.190.153]) by mail.openembedded.org (Postfix) with ESMTP id 4EE6072184 for ; Sat, 22 Nov 2014 20:25:56 +0000 (UTC) Received: from BAY179-W23 ([65.54.190.189]) by BAY004-OMC3S15.hotmail.com over TLS secured channel with Microsoft SMTPSVC(7.5.7601.22751); Sat, 22 Nov 2014 12:25:57 -0800 X-TMN: [GSCOufrZfz/l0GzbVXNGWw/Io/IzjCjL] X-Originating-Email: [jurobystricky@hotmail.com] Message-ID: From: Juro Bystricky To: "openembedded-core@lists.openembedded.org" Date: Sat, 22 Nov 2014 12:25:56 -0800 Importance: Normal MIME-Version: 1.0 X-OriginalArrivalTime: 22 Nov 2014 20:25:57.0303 (UTC) FILETIME=[85C53470:01D00692] Subject: glibc: Inconsistencies in pre-processing of option-groups.h X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Nov 2014 20:26:03 -0000 Content-Type: multipart/alternative; boundary="_1bcc31ed-0da1-4f0d-bc28-91fb65cd7c00_" --_1bcc31ed-0da1-4f0d-bc28-91fb65cd7c00_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable There are some inconsistencies when processing eglibc options. "option-groups.h" is generated automatically=2C and to quote: "It defines macros that indicate which EGLIBC option groups were configured in 'option-groups.config' when this C library was built. For each option group named OPTION_foo=2C it #defines __OPTION_foo to be 1 if the group is enabled=2C or leaves that symbol undefined if the group is disabled." So for example=2C one of the following may be generared: #define __OPTION_XXX 1 or=20 /* undef __OPTION_XXX */ However=2C the glibc headers are preprocessed inconsistently=2C sometimes u= sing: #ifdef __OPTION_XXX ... and sometimes #if __OPTION_XXX ... The latter case will result in many compiler warning for options that are n= ot defined. This is quite evident when building poky-tiny=2C where many options are dis= abled. (This warning will be treated as errors in future releases of glibc.) To fix these inconsistencies=2C there are two solutions: One solution would be to generate #define __OPTION_XXX 0 instead of=20 /* undef __OPTION_XXX */ In this case all preprocessing tests can use/should use=20 #if __OPTION_XXX ... Second solution would be to leave generation of option-groups.h as it is=2C= =20 but in this case all occurrences of=20 #if __OPTION_XXX should be consistently replaced everywhere by=20 #ifdef __OPTION_XXX Juro = --_1bcc31ed-0da1-4f0d-bc28-91fb65cd7c00_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
There are some inconsistencies w= hen processing eglibc options.
"option-groups.h" is generated automatica= lly=2C and to quote:

"It defines macros that indicate which EGLIBC o= ption groups were
 =3B =3B configured in 'option-groups.config' = when this C library was
 =3B =3B built. =3B For each option = group named OPTION_foo=2C it #defines
 =3B =3B __OPTION_foo to b= e 1 if the group is enabled=2C or leaves that
 =3B =3B symbol un= defined if the group is disabled."

So for example=2C one of the foll= owing may be generared:

#define __OPTION_XXX =3B 1

or
/* undef __OPTION_XXX */

However=2C the glibc headers are prepr= ocessed inconsistently=2C sometimes using:

#ifdef __OPTION_XXX
..= .

and sometimes

#if __OPTION_XXX
...

The latter cas= e will result in many compiler warning for options that are not defined.This is quite evident when building poky-tiny=2C where many options are di= sabled.
(This warning will be treated as errors in future releases of gl= ibc.)

To fix these inconsistencies=2C there are two solutions:
One solution would be to generate

#define __OPTION_XXX 0

in= stead of

/* undef __OPTION_XXX */

In this case all preproces= sing tests can use/should use

#if __OPTION_XXX
...

Second= solution would be to leave generation of option-groups.h as it is=2C
b= ut in this case all occurrences of

#if __OPTION_XXX

should b= e consistently replaced everywhere by

#ifdef __OPTION_XXX

Ju= ro
= --_1bcc31ed-0da1-4f0d-bc28-91fb65cd7c00_--