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

Re: [MiNT] binutils ld enhancement ?



Alan Hourihane wrote:
Now, I know we have the --stack option to the linker, but that means
modifying the build files to add that and it's non-portable. So I'm
wondering if 'ld' can read this value from some pre-configured place,
like an /etc/xxx file or maybe /proc/xxx to find out what the current
stack size should be set to on compilations which would mean no changes
to the build files ? What do you think ?

I understand the problem. When building MiNT software, setting a correct stack size is an absolute requirement. And the standard makefiles are not aware of that. I guess this is especially a problem for Gentoo, where standard source packages should be downloaded and compiled transparently.

However, I don't know the best way to do that. Certainly, as you proposed in your other message, a specific environment variable used by the linker would be simple and efficient. But it would be very nonstandard. Maybe the binutils has some way to provide default options, I don't know.
Or maybe Gentoo is flexible enough to customize makefiles ?
Or maybe configure, with something like the file config.site ?

My feeling is that we should see how this kind of problem is solved on other platforms before adding a new functionality inside the linker.

Also, the ld --help output says that stack is set by --stack<size>
where it should say "--stack=<size', i.e. it's missing the equal.

Oh, I didn't notice, but both syntaxes work.
In the --help message, I have used the same syntax as the --stack option specific to the Win32 linker, described in "man ld".

So I think it is correct like this (but the usage of = should be consistent among all options).

--
Vincent Rivière