* Different CFLAGS for arch and non-arch files.
@ 2001-02-21 3:08 Peter Bergner
2001-02-21 4:48 ` Peter Samuelson
0 siblings, 1 reply; 2+ messages in thread
From: Peter Bergner @ 2001-02-21 3:08 UTC (permalink / raw)
To: Linux Kernel; +Cc: bergner
Hopefully someone can point me in the right direction here.
I need to use different CFLAGS options depending on whether
I'm compiling arch dependent code or arch independent code.
It seems the arch/XXX/Makefile only adds extra options to
CFLAGS and doesn't allow me specify options I want to apply
only to arch dependent code and others I'd like to apply
only to arch independent code. Has anyone done such a thing?
I guess I'd like to have CFLAGS, CFLAGS_ARCH and CFLAGS_NONARCH
vars that would be set in the arch/XXX/Makefile and then break
up the SUBDIRS var in the toplevel Makefile into SUBDIRS and
ARCHSUBDIRS so we could iterate over them with the different
CFLAGS options (ie, CFLAGS + CFLAGS_NONARCH for the arch independent
files and CFLAGS + CFLAGS_ARCH for the arch dependent files).
My reason for doing this is that our new architecture's ABI
specifies the use of a TOC (table of contents) and we're running
into a TOC overflow problem. I can use GCC's -mminimal-toc option,
but not for routines that will be called before relocation is turned
on (the global TOC contains virtual addrs of the private TOCs).
My idea is to compile all the arch dependent code without the
-minimal-toc option and all the arch independent code with the
-minimal-toc option.
Any clues on what I can/need to do would be appreciated.
Peter
--
Peter Bergner
SLIC Optimizing Translator Development / Linux PPC64 Kernel Development
IBM Rochester, MN
bergner@us.ibm.com
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Different CFLAGS for arch and non-arch files.
2001-02-21 3:08 Different CFLAGS for arch and non-arch files Peter Bergner
@ 2001-02-21 4:48 ` Peter Samuelson
0 siblings, 0 replies; 2+ messages in thread
From: Peter Samuelson @ 2001-02-21 4:48 UTC (permalink / raw)
To: Peter Bergner; +Cc: Linux Kernel, bergner
[Peter Bergner]
> Hopefully someone can point me in the right direction here.
> I need to use different CFLAGS options depending on whether
> I'm compiling arch dependent code or arch independent code.
Use the per-directory $(EXTRA_CFLAGS), and/or the per-file
$(CFLAGS_foo.o). See also $(EXTRA_AFLAGS), $(EXTRA_LDFLAGS) and
$(AFLAGS_foo.o). I suppose there ought to be a $(LDFLAGS_foo.o) for
completeness, but nobody has needed it yet.
Peter
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2001-02-21 4:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-02-21 3:08 Different CFLAGS for arch and non-arch files Peter Bergner
2001-02-21 4:48 ` Peter Samuelson
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.