This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Gcc/ld and long command lines (> 32k)


> Several replies mentioned the possibility of making several
> intermediate libraries. I'm well aware of that possibility.  But since
> I'm not interested in the "library functionality" of libraries, any such
> partitioning seems artificial. I always want a *full linking* where all
> object files are needed.

You can try using an implicit linker script.  Create a file, call it
something like "my-ld-script", with lines like the following:

	INPUT(obj1.o obj2.o obj3.o)
	INPUT(obj4.o, obj5.o, obj6.o)
	INPUT(obj7.o)

And then instead of linking with a command that looks something like this:

	gcc -o foo.exe obj1.o obj2.o ... obj7.o -lbar -lbaz

Use something like this:

	gcc -o foo.exe my-ld-script -lbar -lbaz

						Ross Ridge


-- 
 l/  //	  Ross Ridge -- The Great HTMU
[oo][oo]  rridge@csclub.uwaterloo.ca
-()-/()/  http://www.csclub.uwaterloo.ca/u/rridge/ 
 db  //	  

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]