Hi!
> But I think that my approach is easier to understand: we explicitly 
> define object files targets, make them depend on compat_16.h and also 
> mark them as intermediate targets (so make will remove them after linking).
> 
> And if we make binaries to depend on compat_16.h gcc treats this header 
> file not as a header:
> 
> gcc -g -O2 -g -O2 -fno-strict-aliasing -pipe -Wall 
> -I/home/stas/ltp/testcases/kernel/include 
> -I/home/stas/ltp/testcases/kernel/syscalls/setgroups 
> -I/home/stas/ltp/testcases/kernel/syscalls/setgroups/../utils 
> -I../../../../include -I../../../../include   -L../../../../lib 
> setgroups01.c 
> /home/stas/ltp/testcases/kernel/syscalls/setgroups/../utils/compat_16.h 
> -lltp -o setgroups01
> 
> gcc -g -O2 -g -O2 -fno-strict-aliasing -pipe -Wall 
> -I/home/stas/ltp/testcases/kernel/include 
> -I/home/stas/ltp/testcases/kernel/syscalls/setgroups 
> -I/home/stas/ltp/testcases/kernel/syscalls/setgroups/../utils 
> -I../../../../include -I../../../../include 
> -DTST_USE_COMPAT16_SYSCALL=1  -c -o setgroups01_16.o setgroups01.c
> gcc   -L../../../../lib  setgroups01_16.o 
> /home/stas/ltp/testcases/kernel/syscalls/setgroups/../utils/compat_16.h 
> -lltp -o setgroups01_16
> 
> It doesn't look nice :)

Ah, it gets to the list of prerequisities and gets apended to the
linking. I Should have noticed this.

I guess that your approach is better.

-- 
Cyril Hrubis
[email protected]

------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to