Skip to contentSkip to conversation

Only export required CFLAGS via xeno-config

PATCH In review Jan Kiszka 2 participants 6 messages Feb 3, 2012 – Feb 8, 2012

lore
Share & tools
lore

Jan Kiszka

author
#0 lore raw

PATCH 1/1 Only export required CFLAGS via xeno-config

-Werror-implicit-function-declaration is not compatible with C++, and also decisions about -Wall and -pipe should be left to the application.

---
 configure.in |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)
configure.in +6 -6
index b2563ee..2185925 100644
@@ -448,13 +448,13 @@ else
 fi
 AC_MSG_RESULT([done])
 
-dnl Common CFLAGS and LDFLAGS
-XENO_USER_CFLAGS="-D_GNU_SOURCE -D_REENTRANT -Wall -Werror-implicit-function-declaration -pipe"
-XENO_USER_LDFLAGS=
+dnl Exported CFLAGS and LDFLAGS, shared with internal flags
+XENO_USER_APP_CFLAGS="-D_GNU_SOURCE -D_REENTRANT"
+XENO_USER_APP_LDFLAGS=
 
-dnl Exported CFLAGS and LDFLAGS, may be enhanced per-arch below
-XENO_USER_APP_CFLAGS=$XENO_USER_CFLAGS
-XENO_USER_APP_LDFLAGS=$XENO_USER_LDFLAGS
+dnl Internal CFLAGS and LDFLAGS, may be enhanced per-arch below
+XENO_USER_CFLAGS="$XENO_USER_CFLAGS -Wall -Werror-implicit-function-declaration -pipe"
+XENO_USER_LDFLAGS="$XENO_USER_APP_LDFLAGS"
 
 case $XENO_TARGET_ARCH in
  x86)
Signature · 1 line
1.7.3.4
#1 lore raw
Quoted 19 lines · Jan Kiszka

-Werror-implicit-function-declaration is not compatible with C++, and also decisions about -Wall and -pipe should be left to the application.

---
 configure.in |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)
configure.in +0 -3
index b2563ee..2185925 100644
@@ -448,13 +448,13 @@ else
 fi
 AC_MSG_RESULT([done])
 
-dnl Common CFLAGS and LDFLAGS
-XENO_USER_CFLAGS="-D_GNU_SOURCE -D_REENTRANT -Wall -Werror-implicit-function-declaration -pipe"
-XENO_USER_LDFLAGS=

configure.in else · line 457

Quoted 10 lines
configure.in +6 -3
+dnl Exported CFLAGS and LDFLAGS, shared with internal flags
+XENO_USER_APP_CFLAGS="-D_GNU_SOURCE -D_REENTRANT"
+XENO_USER_APP_LDFLAGS=
 
-dnl Exported CFLAGS and LDFLAGS, may be enhanced per-arch below
-XENO_USER_APP_CFLAGS=$XENO_USER_CFLAGS
-XENO_USER_APP_LDFLAGS=$XENO_USER_LDFLAGS
+dnl Internal CFLAGS and LDFLAGS, may be enhanced per-arch below
+XENO_USER_CFLAGS="$XENO_USER_CFLAGS -Wall -Werror-implicit-function-declaration -pipe"
+XENO_USER_LDFLAGS="$XENO_USER_APP_LDFLAGS"

We do not build C++ code, so I see no problem with using flags incompatible with C++, and customize the flags according to our preferences. Now, the flags returned by xeno-config are another issue, if this is what you want to change, please do not change the flags used to compile xenomai globally.

Signature · 1 line
					    Gilles.
#2 lore raw
Quoted 24 lines · Gilles Chanteperdrix
Quoted 23 lines · Jan Kiszka

-Werror-implicit-function-declaration is not compatible with C++, and also decisions about -Wall and -pipe should be left to the application.

---
 configure.in |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)
configure.in +3 -3
index b2563ee..2185925 100644
@@ -448,13 +448,13 @@ else
 fi
 AC_MSG_RESULT([done])
 
-dnl Common CFLAGS and LDFLAGS
-XENO_USER_CFLAGS="-D_GNU_SOURCE -D_REENTRANT -Wall -Werror-implicit-function-declaration -pipe"
-XENO_USER_LDFLAGS=
+dnl Exported CFLAGS and LDFLAGS, shared with internal flags
+XENO_USER_APP_CFLAGS="-D_GNU_SOURCE -D_REENTRANT"
+XENO_USER_APP_LDFLAGS=
 
Quoted 13 lines

configure.in else · line 457

Quoted 6 lines
configure.in +3 -3
-dnl Exported CFLAGS and LDFLAGS, may be enhanced per-arch below
-XENO_USER_APP_CFLAGS=$XENO_USER_CFLAGS
-XENO_USER_APP_LDFLAGS=$XENO_USER_LDFLAGS
+dnl Internal CFLAGS and LDFLAGS, may be enhanced per-arch below
+XENO_USER_CFLAGS="$XENO_USER_CFLAGS -Wall -Werror-implicit-function-declaration -pipe"
+XENO_USER_LDFLAGS="$XENO_USER_APP_LDFLAGS"

We do not build C++ code, so I see no problem with using flags incompatible with C++, and customize the flags according to our preferences. Now, the flags returned by xeno-config are another issue, if this is what you want to change, please do not change the flags used to compile xenomai globally.

Which is exactly what your patch is doing, sorry for the noise, the patch looks fine.

Signature · 1 line
					    Gilles.
#3 lore raw
In reply to Jan Kiszka
Quoted 4 lines · Jan Kiszka

-Werror-implicit-function-declaration is not compatible with C++, and also decisions about -Wall and -pipe should be left to the application.

Had to revert this patch, it causes a build failure when cross-compiling (for ARM, I do not know if it matters).

Signature · 1 line
                                                                Gilles.
author
#4 lore raw
Quoted 8 lines · Gilles Chanteperdrix
Quoted 4 lines · Jan Kiszka

-Werror-implicit-function-declaration is not compatible with C++, and also decisions about -Wall and -pipe should be left to the application.

Had to revert this patch, it causes a build failure when cross-compiling (for ARM, I do not know if it matters).

-pipe? Or a weird compiler bug? -Wsomething can't make a difference.

Jan

Signature · 2 lines
Siemens AG, Corporate Technology, CT T DE IT 1
Corporate Competence Center Embedded Linux
#5 lore raw
Quoted 5 lines · Jan Kiszka
Quoted 4 lines · Gilles Chanteperdrix
Quoted 3 lines · Jan Kiszka

-Werror-implicit-function-declaration is not compatible with C++, and also decisions about -Wall and -pipe should be left to the application.

Quoted 9 lines
Quoted 4 lines
Quoted 1 line

Had to revert this patch, it causes a build failure when cross-compiling (for ARM, I do not know if it matters).

-pipe? Or a weird compiler bug? -Wsomething can't make a difference.

Jan

sighandler_t not defined, so I suspect -D_GNU_SOURCE gets lost. Anyway, I will retry this one later, am working on other issues now.

Signature · 1 line
					    Gilles.