All of lore.kernel.org
 help / color / mirror / Atom feed
* gcc -print-file-name option without path?
@ 2012-03-26 15:57 Zoufal Andreas
  2012-03-26 16:02 ` McClintock Matthew-B29882
  2012-03-26 21:44 ` Khem Raj
  0 siblings, 2 replies; 7+ messages in thread
From: Zoufal Andreas @ 2012-03-26 15:57 UTC (permalink / raw)
  To: poky@yoctoproject.org

Hello,
We am starting to use the Yocto/Poky toolchain as replacement for ELDK5. Trying to compile our existing kernel fails, but it worked fine with ELDK5. Doing some investigation we recognized a different behavior which I guess is the reason for the problem: using the cross compiler to show the path of the libgcc.a with the option "-print-libgcc-file-name" doesn't show the full path, only the filename itself! But ELDK5 does. 
I'm using poky-1.2_M3.final for arm, and the build folder is in my home directory, like:
/home/user/path/to/project/poky/build/tmp/sysroots   ...and so on
Am I doing something wrong? gcc --help says that the -print-file-name should return the full path, which is even not true.
Kind regards, Andi


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: gcc -print-file-name option without path?
  2012-03-26 15:57 gcc -print-file-name option without path? Zoufal Andreas
@ 2012-03-26 16:02 ` McClintock Matthew-B29882
  2012-03-26 16:23   ` Zoufal Andreas
  2012-03-26 21:44 ` Khem Raj
  1 sibling, 1 reply; 7+ messages in thread
From: McClintock Matthew-B29882 @ 2012-03-26 16:02 UTC (permalink / raw)
  To: Zoufal Andreas; +Cc: poky@yoctoproject.org

On Mon, Mar 26, 2012 at 10:57 AM, Zoufal Andreas
<Andreas.Zoufal@ait.ac.at> wrote:
> Hello,
> We am starting to use the Yocto/Poky toolchain as replacement for ELDK5. Trying to compile our existing kernel fails, but it worked fine with ELDK5. Doing some investigation we recognized a different behavior which I guess is the reason for the problem: using the cross compiler to show the path of the libgcc.a with the option "-print-libgcc-file-name" doesn't show the full path, only the filename itself! But ELDK5 does.
> I'm using poky-1.2_M3.final for arm, and the build folder is in my home directory, like:
> /home/user/path/to/project/poky/build/tmp/sysroots   ...and so on
> Am I doing something wrong? gcc --help says that the -print-file-name should return the full path, which is even not true.
> Kind regards, Andi

Andi,

Make sure you are passing the --sysroot option to gcc, this is the
default CC used in Yocto. Then it should find libgcc OK.

-M


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: gcc -print-file-name option without path?
  2012-03-26 16:02 ` McClintock Matthew-B29882
@ 2012-03-26 16:23   ` Zoufal Andreas
  2012-03-26 16:27     ` McClintock Matthew-B29882
  0 siblings, 1 reply; 7+ messages in thread
From: Zoufal Andreas @ 2012-03-26 16:23 UTC (permalink / raw)
  To: poky@yoctoproject.org

Thanks Matthew, yes it seems this is the solution. I tried it manually. 
I wonder, I sourced the environment file and the CFLAGS, LDFLAGS and so on should be set with --sysroot. Can it be, kernel make file overwrite this options? And how can I make this option available to kernels makefile without modifying it?
Andi 

-----Original Message-----
From: McClintock Matthew-B29882 [mailto:B29882@freescale.com] 
Sent: Monday, March 26, 2012 6:02 PM
To: Zoufal Andreas
Cc: poky@yoctoproject.org
Subject: Re: [poky] gcc -print-file-name option without path?

On Mon, Mar 26, 2012 at 10:57 AM, Zoufal Andreas
<Andreas.Zoufal@ait.ac.at> wrote:
> Hello,
> We am starting to use the Yocto/Poky toolchain as replacement for ELDK5. Trying to compile our existing kernel fails, but it worked fine with ELDK5. Doing some investigation we recognized a different behavior which I guess is the reason for the problem: using the cross compiler to show the path of the libgcc.a with the option "-print-libgcc-file-name" doesn't show the full path, only the filename itself! But ELDK5 does.
> I'm using poky-1.2_M3.final for arm, and the build folder is in my home directory, like:
> /home/user/path/to/project/poky/build/tmp/sysroots   ...and so on
> Am I doing something wrong? gcc --help says that the -print-file-name should return the full path, which is even not true.
> Kind regards, Andi

Andi,

Make sure you are passing the --sysroot option to gcc, this is the
default CC used in Yocto. Then it should find libgcc OK.

-M


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: gcc -print-file-name option without path?
  2012-03-26 16:23   ` Zoufal Andreas
@ 2012-03-26 16:27     ` McClintock Matthew-B29882
  2012-03-26 17:12       ` Zoufal Andreas
  0 siblings, 1 reply; 7+ messages in thread
From: McClintock Matthew-B29882 @ 2012-03-26 16:27 UTC (permalink / raw)
  To: Zoufal Andreas; +Cc: poky@yoctoproject.org

On Mon, Mar 26, 2012 at 11:23 AM, Zoufal Andreas
<Andreas.Zoufal@ait.ac.at> wrote:
> Thanks Matthew, yes it seems this is the solution. I tried it manually.
> I wonder, I sourced the environment file and the CFLAGS, LDFLAGS and so on should be set with --sysroot. Can it be, kernel make file overwrite this options? And how can I make this option available to kernels makefile without modifying it?

Basically, the Makefile for whatever you are building is not passing it through.

-M


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: gcc -print-file-name option without path?
  2012-03-26 16:27     ` McClintock Matthew-B29882
@ 2012-03-26 17:12       ` Zoufal Andreas
  0 siblings, 0 replies; 7+ messages in thread
From: Zoufal Andreas @ 2012-03-26 17:12 UTC (permalink / raw)
  To: poky@yoctoproject.org

Yes look like that. It is a Kernel build system, I try to use KCFLAGS=$CFLAGS

-----Original Message-----
From: McClintock Matthew-B29882 [mailto:B29882@freescale.com] 
Sent: Monday, March 26, 2012 6:28 PM
To: Zoufal Andreas
Cc: poky@yoctoproject.org
Subject: Re: [poky] gcc -print-file-name option without path?

On Mon, Mar 26, 2012 at 11:23 AM, Zoufal Andreas <Andreas.Zoufal@ait.ac.at> wrote:
> Thanks Matthew, yes it seems this is the solution. I tried it manually.
> I wonder, I sourced the environment file and the CFLAGS, LDFLAGS and so on should be set with --sysroot. Can it be, kernel make file overwrite this options? And how can I make this option available to kernels makefile without modifying it?

Basically, the Makefile for whatever you are building is not passing it through.

-M


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: gcc -print-file-name option without path?
  2012-03-26 15:57 gcc -print-file-name option without path? Zoufal Andreas
  2012-03-26 16:02 ` McClintock Matthew-B29882
@ 2012-03-26 21:44 ` Khem Raj
  2012-03-27  8:13   ` Andreas Zoufal
  1 sibling, 1 reply; 7+ messages in thread
From: Khem Raj @ 2012-03-26 21:44 UTC (permalink / raw)
  To: Zoufal Andreas; +Cc: poky@yoctoproject.org

On Mon, Mar 26, 2012 at 8:57 AM, Zoufal Andreas
<Andreas.Zoufal@ait.ac.at> wrote:
> Hello,
> We am starting to use the Yocto/Poky toolchain as replacement for ELDK5. Trying to compile our existing kernel fails, but it worked fine with ELDK5. Doing some investigation we recognized a different behavior which I guess is the reason for the problem: using the cross compiler to show the path of the libgcc.a with the option "-print-libgcc-file-name" doesn't show the full path, only the filename itself! But ELDK5 does.
> I'm using poky-1.2_M3.final for arm, and the build folder is in my home directory, like:
> /home/user/path/to/project/poky/build/tmp/sysroots   ...and so on
> Am I doing something wrong? gcc --help says that the -print-file-name should return the full path, which is even not true.
> Kind regards, Andi


while the problem is not passing --sysroot option I wonder why do you query for
libgcc when you are building kernel ? kernel should not need libgcc as
it provides any function needed from libgcc in a library of its own.
> _______________________________________________
> poky mailing list
> poky@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/poky


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: gcc -print-file-name option without path?
  2012-03-26 21:44 ` Khem Raj
@ 2012-03-27  8:13   ` Andreas Zoufal
  0 siblings, 0 replies; 7+ messages in thread
From: Andreas Zoufal @ 2012-03-27  8:13 UTC (permalink / raw)
  To: poky@yoctoproject.org

I can only say that this part of the Makefile, here is the grep output:
./arch/arm/boot/compressed/Makefile:    $(shell $(CC) $(KBUILD_CFLAGS) 
--print-libgcc-file-name) -T
We use the TI PSP.03.XX.00.37 Kernel. I checked the source code for the 
current stable kernel release, the usage of '-print-libgcc-file-name' 
vanished for the ARM architecture, but is still used for some others.

On 03/26/2012 11:44 PM, Khem Raj wrote:
> On Mon, Mar 26, 2012 at 8:57 AM, Zoufal Andreas
> <Andreas.Zoufal@ait.ac.at>  wrote:
>> Hello,
>> We am starting to use the Yocto/Poky toolchain as replacement for ELDK5. Trying to compile our existing kernel fails, but it worked fine with ELDK5. Doing some investigation we recognized a different behavior which I guess is the reason for the problem: using the cross compiler to show the path of the libgcc.a with the option "-print-libgcc-file-name" doesn't show the full path, only the filename itself! But ELDK5 does.
>> I'm using poky-1.2_M3.final for arm, and the build folder is in my home directory, like:
>> /home/user/path/to/project/poky/build/tmp/sysroots   ...and so on
>> Am I doing something wrong? gcc --help says that the -print-file-name should return the full path, which is even not true.
>> Kind regards, Andi
>
> while the problem is not passing --sysroot option I wonder why do you query for
> libgcc when you are building kernel ? kernel should not need libgcc as
> it provides any function needed from libgcc in a library of its own.
>> _______________________________________________
>> poky mailing list
>> poky@yoctoproject.org
>> https://lists.yoctoproject.org/listinfo/poky



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2012-03-27  8:13 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-26 15:57 gcc -print-file-name option without path? Zoufal Andreas
2012-03-26 16:02 ` McClintock Matthew-B29882
2012-03-26 16:23   ` Zoufal Andreas
2012-03-26 16:27     ` McClintock Matthew-B29882
2012-03-26 17:12       ` Zoufal Andreas
2012-03-26 21:44 ` Khem Raj
2012-03-27  8:13   ` Andreas Zoufal

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.