Re: getting the same cflags

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Apr 11, 2006 at 02:21:25PM -0400, Jared Greenwald wrote:

> Another Makefile question...
> 
> Is there a way to easily grab the CFLAGS from the kernel Makefile to
> use in a user space application?  The obvious would be to copy-paste,
> but that would ignore all of the logic in the kernel Makefile that I
> want to preserve.

Since you need to check each of them manually anyways, simply compile 
you kernel with "make V=1".

But note that options like -ffreestanding, -msoft-float or -mregparm=3 
will most likely not make any sense (and actually do harm) in your user 
space application ("info gcc" gives you more information on them).

Besides this, at least the cpu options might not be optimal for 
userspace since the kernel doesn't use options like -march=athlon-xp 
that bring improvements only for floating point maths.

> Thanks,
> Jared

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed


--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux