Skip to contentSkip to conversation

perf: Remove CFLAGS and LDFLAGS override

PATCH In review Otavio Salvador 3 participants 6 messages Sep 16, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 perf: Remove CFLAGS and LDFLAGS override

The kernel build system does the right thing here and we should stop overriding it. This code has been added based on a change from 'meta-metro' layer, revision 9d698004137c1a888d40d6a4808d94afa22387e7, without any information about what problem it fixes so I am reverting it.

Using the CFLAGS makes it impossible for kernel build system to append to it, thus making the build fail in various ways as:

|     CC /.../perf/1.0-r8/perf-1.0/perf.o
| In file included from builtin.h:4:0,
|                  from perf.c:9:
| util/util.h:74:24: fatal error: lk/debugfs.h: No such file or directory
|  #include <lk/debugfs.h>
|                         ^
| compilation terminated.
Cc Christopher Larson <[email protected]>
---
 meta/recipes-kernel/perf/perf.bb | 6 ------
 1 file changed, 6 deletions(-)
meta/recipes-kernel/perf/perf.bb +0 -6
index d2c1048..8d35fc6 100644
@@ -72,13 +72,7 @@ EXTRA_OEMAKE = \
 		NO_GTK2=1 ${TUI_DEFINES} NO_DWARF=1 ${SCRIPTING_DEFINES} \
 		'
 
-# We already pass the correct arguments to our compiler for the CFLAGS (if we
-# don't override it, it'll add -m32/-m64 itself). For LDFLAGS, it was failing
-# to find bfd symbols.
 EXTRA_OEMAKE += "\
-	'CFLAGS=${CFLAGS} -fPIC' \
-	'LDFLAGS=${LDFLAGS} -lpthread -lrt -lelf -lm -lbfd' \
-	\
 	'prefix=${prefix}' \
 	'bindir=${bindir}' \
 	'sharedir=${datadir}' \
Signature · 1 line
1.8.4.rc3
#1 lore raw
Quoted 28 lines · Otavio Salvador

The kernel build system does the right thing here and we should stop overriding it. This code has been added based on a change from 'meta-metro' layer, revision 9d698004137c1a888d40d6a4808d94afa22387e7, without any information about what problem it fixes so I am reverting it.

Using the CFLAGS makes it impossible for kernel build system to append to it, thus making the build fail in various ways as:

|     CC /.../perf/1.0-r8/perf-1.0/perf.o
| In file included from builtin.h:4:0,
|                  from perf.c:9:
| util/util.h:74:24: fatal error: lk/debugfs.h: No such file or directory
|  #include <lk/debugfs.h>
|                         ^
| compilation terminated.
Cc Christopher Larson <[email protected]>
---
  meta/recipes-kernel/perf/perf.bb | 6 ------
  1 file changed, 6 deletions(-)
meta/recipes-kernel/perf/perf.bb +0 -0
index d2c1048..8d35fc6 100644

meta/recipes-kernel/perf/perf.bb EXTRA_OEMAKE = \ · line 81

Quoted 10 lines
meta/recipes-kernel/perf/perf.bb +0 -6
@@ -72,13 +72,7 @@ EXTRA_OEMAKE = \
  		NO_GTK2=1 ${TUI_DEFINES} NO_DWARF=1 ${SCRIPTING_DEFINES} \
  		'
 
-# We already pass the correct arguments to our compiler for the CFLAGS (if we
-# don't override it, it'll add -m32/-m64 itself). For LDFLAGS, it was failing
-# to find bfd symbols.
  EXTRA_OEMAKE += "\
-	'CFLAGS=${CFLAGS} -fPIC' \
-	'LDFLAGS=${LDFLAGS} -lpthread -lrt -lelf -lm -lbfd' \
-	\

Maybe not, I got a compile error with this on the Autobuilder.

http://autobuilder.yoctoproject.org:8011/builders/nightly-x86-64/builds/286/steps/Building%20Images/logs/stdio

Sau!

Quoted 4 lines
meta/recipes-kernel/perf/perf.bb +0 -0
  	'prefix=${prefix}' \
  	'bindir=${bindir}' \
  	'sharedir=${datadir}' \
#2 lore raw
Quoted 46 lines · Saul Wold
Quoted 37 lines · Otavio Salvador

The kernel build system does the right thing here and we should stop overriding it. This code has been added based on a change from 'meta-metro' layer, revision 9d698004137c1a888d40d6a4808d94afa22387e7, without any information about what problem it fixes so I am reverting it.

Using the CFLAGS makes it impossible for kernel build system to append to it, thus making the build fail in various ways as:

|     CC /.../perf/1.0-r8/perf-1.0/perf.o
| In file included from builtin.h:4:0,
|                  from perf.c:9:
| util/util.h:74:24: fatal error: lk/debugfs.h: No such file or directory
|  #include <lk/debugfs.h>
|                         ^
| compilation terminated.
Cc Christopher Larson <[email protected]>
---
  meta/recipes-kernel/perf/perf.bb | 6 ------
  1 file changed, 6 deletions(-)
meta/recipes-kernel/perf/perf.bb +0 -1
index d2c1048..8d35fc6 100644
@@ -72,13 +72,7 @@ EXTRA_OEMAKE = \
                NO_GTK2=1 ${TUI_DEFINES} NO_DWARF=1 ${SCRIPTING_DEFINES} \
                '
 
-# We already pass the correct arguments to our compiler for the CFLAGS

(if we
-# don't override it, it'll add -m32/-m64 itself). For LDFLAGS, it was failing

meta/recipes-kernel/perf/perf.bb EXTRA_OEMAKE = \ · line 81

Quoted 5 lines
meta/recipes-kernel/perf/perf.bb +0 -4
-# to find bfd symbols.
  EXTRA_OEMAKE += "\
-       'CFLAGS=${CFLAGS} -fPIC' \
-       'LDFLAGS=${LDFLAGS} -lpthread -lrt -lelf -lm -lbfd' \
-       \

Maybe not, I got a compile error with this on the Autobuilder.

Quoted 1 line

http://autobuilder.yoctoproject.org:8011/builders/nightly-x86-64/builds/286/steps/Building%20Images/logs/stdio

I only reproduce this error if I build with EXTRA_CFLAGS set. There are no other changes in perf?

Signature · 3 lines
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750
#3 lore raw
Quoted 47 lines · Otavio Salvador
Quoted 46 lines · Saul Wold
Quoted 37 lines · Otavio Salvador

The kernel build system does the right thing here and we should stop overriding it. This code has been added based on a change from 'meta-metro' layer, revision 9d698004137c1a888d40d6a4808d94afa22387e7, without any information about what problem it fixes so I am reverting it.

Using the CFLAGS makes it impossible for kernel build system to append to it, thus making the build fail in various ways as:

|     CC /.../perf/1.0-r8/perf-1.0/perf.o
| In file included from builtin.h:4:0,
|                  from perf.c:9:
| util/util.h:74:24: fatal error: lk/debugfs.h: No such file or directory
|  #include <lk/debugfs.h>
|                         ^
| compilation terminated.
Cc Christopher Larson <[email protected]>
---
  meta/recipes-kernel/perf/perf.bb | 6 ------
  1 file changed, 6 deletions(-)
meta/recipes-kernel/perf/perf.bb +0 -1
index d2c1048..8d35fc6 100644
@@ -72,13 +72,7 @@ EXTRA_OEMAKE = \
                NO_GTK2=1 ${TUI_DEFINES} NO_DWARF=1 ${SCRIPTING_DEFINES} \
                '
 
-# We already pass the correct arguments to our compiler for the CFLAGS

(if we
-# don't override it, it'll add -m32/-m64 itself). For LDFLAGS, it was failing

meta/recipes-kernel/perf/perf.bb EXTRA_OEMAKE = \ · line 81

Quoted 5 lines
meta/recipes-kernel/perf/perf.bb +0 -4
-# to find bfd symbols.
  EXTRA_OEMAKE += "\
-       'CFLAGS=${CFLAGS} -fPIC' \
-       'LDFLAGS=${LDFLAGS} -lpthread -lrt -lelf -lm -lbfd' \
-       \

Maybe not, I got a compile error with this on the Autobuilder.

Quoted 4 lines
Quoted 1 line

http://autobuilder.yoctoproject.org:8011/builders/nightly-x86-64/builds/286/steps/Building%20Images/logs/stdio

I only reproduce this error if I build with EXTRA_CFLAGS set. There are no other changes in perf?

I reproduced the error too. I am on it but still have no clue why it worked and now fails.

Checking...

Signature · 3 lines
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750
#4 lore raw
Quoted 49 lines · Otavio Salvador
Quoted 47 lines · Otavio Salvador
Quoted 46 lines · Saul Wold
Quoted 37 lines · Otavio Salvador

The kernel build system does the right thing here and we should stop overriding it. This code has been added based on a change from 'meta-metro' layer, revision 9d698004137c1a888d40d6a4808d94afa22387e7, without any information about what problem it fixes so I am reverting it.

Using the CFLAGS makes it impossible for kernel build system to append to it, thus making the build fail in various ways as:

|     CC /.../perf/1.0-r8/perf-1.0/perf.o
| In file included from builtin.h:4:0,
|                  from perf.c:9:
| util/util.h:74:24: fatal error: lk/debugfs.h: No such file or directory
|  #include <lk/debugfs.h>
|                         ^
| compilation terminated.
Cc Christopher Larson <[email protected]>
---
  meta/recipes-kernel/perf/perf.bb | 6 ------
  1 file changed, 6 deletions(-)
meta/recipes-kernel/perf/perf.bb +0 -1
index d2c1048..8d35fc6 100644
@@ -72,13 +72,7 @@ EXTRA_OEMAKE = \
                NO_GTK2=1 ${TUI_DEFINES} NO_DWARF=1 ${SCRIPTING_DEFINES} \
                '
 
-# We already pass the correct arguments to our compiler for the CFLAGS

(if we
-# don't override it, it'll add -m32/-m64 itself). For LDFLAGS, it was failing

meta/recipes-kernel/perf/perf.bb EXTRA_OEMAKE = \ · line 81

Quoted 5 lines
meta/recipes-kernel/perf/perf.bb +0 -4
-# to find bfd symbols.
  EXTRA_OEMAKE += "\
-       'CFLAGS=${CFLAGS} -fPIC' \
-       'LDFLAGS=${LDFLAGS} -lpthread -lrt -lelf -lm -lbfd' \
-       \

Maybe not, I got a compile error with this on the Autobuilder.

Quoted 7 lines
Quoted 4 lines
Quoted 1 line

http://autobuilder.yoctoproject.org:8011/builders/nightly-x86-64/builds/286/steps/Building%20Images/logs/stdio

I only reproduce this error if I build with EXTRA_CFLAGS set. There are no other changes in perf?

I reproduced the error too. I am on it but still have no clue why it worked and now fails.

I've also reproduced it. Will report if I find anything interesting. The problem is that
I don' t have Otavio's case to test against, so if we fix this, we'll probably just re-break
his build.

Bruce

Quoted 11 lines

Checking...

--
Otavio Salvador O.S. Systems
http://www.ossystems.com.br http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854 Mobile: +1 (347) 903-9750
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Signature · 2 lines
"Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end"
#5 lore raw
Quoted 56 lines · Bruce Ashfield
Quoted 54 lines · Otavio Salvador
Quoted 51 lines · Otavio Salvador
Quoted 46 lines · Saul Wold
Quoted 37 lines · Otavio Salvador

The kernel build system does the right thing here and we should stop overriding it. This code has been added based on a change from 'meta-metro' layer, revision 9d698004137c1a888d40d6a4808d94afa22387e7, without any information about what problem it fixes so I am reverting it.

Using the CFLAGS makes it impossible for kernel build system to append to it, thus making the build fail in various ways as:

|     CC /.../perf/1.0-r8/perf-1.0/perf.o
| In file included from builtin.h:4:0,
|                  from perf.c:9:
| util/util.h:74:24: fatal error: lk/debugfs.h: No such file or directory
|  #include <lk/debugfs.h>
|                         ^
| compilation terminated.
Cc Christopher Larson <[email protected]>
---
  meta/recipes-kernel/perf/perf.bb | 6 ------
  1 file changed, 6 deletions(-)
meta/recipes-kernel/perf/perf.bb +0 -1
index d2c1048..8d35fc6 100644
@@ -72,13 +72,7 @@ EXTRA_OEMAKE = \
                NO_GTK2=1 ${TUI_DEFINES} NO_DWARF=1 ${SCRIPTING_DEFINES} \
                '
 
-# We already pass the correct arguments to our compiler for the CFLAGS

(if we
-# don't override it, it'll add -m32/-m64 itself). For LDFLAGS, it was failing

meta/recipes-kernel/perf/perf.bb EXTRA_OEMAKE = \ · line 81

Quoted 5 lines
meta/recipes-kernel/perf/perf.bb +0 -4
-# to find bfd symbols.
  EXTRA_OEMAKE += "\
-       'CFLAGS=${CFLAGS} -fPIC' \
-       'LDFLAGS=${LDFLAGS} -lpthread -lrt -lelf -lm -lbfd' \
-       \

Maybe not, I got a compile error with this on the Autobuilder.

Quoted 1 line

http://autobuilder.yoctoproject.org:8011/builders/nightly-x86-64/builds/286/steps/Building%20Images/logs/stdio

I only reproduce this error if I build with EXTRA_CFLAGS set. There are no other changes in perf?

Quoted 8 lines
Quoted 2 lines

I reproduced the error too. I am on it but still have no clue why it worked and now fails.

I've also reproduced it. Will report if I find anything interesting. The problem is that
I don' t have Otavio's case to test against, so if we fix this, we'll probably just re-break
his build.

I did a fix for it and am adding it for my builder for testing. Will send if it proves to work there.

Signature · 3 lines
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750