mirror of
https://github.com/bitwiseworks/gcc-os2.git
synced 2026-02-15 06:34:57 +00:00
GCC 9.2.0 fails to link xul.dll #30
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @dryeo on GitHub (Apr 12, 2020).
After trials and tribulations, I've got as far as linking xul.dll using the latest netlabs.exp stuff.
Linking fails pretty quick with this error,
Running make with a 4.9.2 GCC environment in $OBJDIR/toolkit/library works as well as expected, eventually dying due to unresolved symbols as expected as we're using different libgcc and stdc++.
To me it appears a failure of GCC writing the correct response file before calling emxomfld
While linking with 4.9.2, I find in $TMPDIR grsp0001.tmp containing the expected command line broken up on a per line basis.
@dmik commented on GitHub (Apr 13, 2020):
You should extract the link command and add the
-vargument to gcc/g++ to see how it calls emxomfld in 9.2.0. You should also do the same with gcc 4.9.2 to see the difference. It might be related to #14 but I'm not seeing how ATM.@dryeo commented on GitHub (Apr 13, 2020):
What would be the best way to do that? Build a response file? The
command is pretty big and I guess it would involve nested response files.
@StevenLevine commented on GitHub (Apr 13, 2020):
What I do for this kind of testing is extract the failing command from the
log and stuff it into a sh.exe script. This makes it easy to wrap the
lines for readability and add anything needed to prepare any dependent
files the command line might need.
To run your script from cmd.exe or 4os2, it's:
sh -c 't.sh args'
whee t.sh is the script and args are any args that need to be passed. If
find this more efficient that setting sh.exe to the session shell. This
is what I used when working on your ::lldiv_t issue. You might recognize:
sh -c 't.sh -E -C'
from what we used to track down the #include issues.
@dryeo commented on GitHub (Apr 13, 2020):
Ok, testing with GCC 5.5.0 as it also almost works with one missing
symbol from libgcc and I don't have to reboot.
The beginning of the emxomfld line differs in 5.5.0 not listing a
response file whereas 9.9.2 does, snippet from 5.5.0,
From 5.5.0
I'm leaving out the huge list of object files etc. This is the only
place I can find a reference to the response file besides the error at
the end.
@dryeo commented on GitHub (Apr 13, 2020):
Should also mention that the command line I'm using includes a response
file containing the 873 object files.
@dryeo commented on GitHub (Apr 14, 2020):
Adding -DHAVE_GNU__LD to the compile line doesn't help.Running the
emxomfld line after removing the reference to the response file does
produce xul.dll.
I also tried replacing the list file in the GCC command with all the
object files but got "c++ invalid argument" likely due to a command line
over 40k long.
@dmik commented on GitHub (Apr 14, 2020):
@dryeo what's in
@k:\var\temp/ccDLEvol? A list of 873 object files on a single line, or each on a new line? Does it work if you run this emxomfld command manually? Or same error?@dmik commented on GitHub (Apr 14, 2020):
Some testing shows that the problem might be in LIBC spawn code. Even this simple case:
with the contents of
aaabeing just--helpfails with:but only if run from an .sh script (by sh.exe which uses spawn to start processes). If I use cmd instead, the problem disappears. kLIBC is known to do custom command line processing when both the parent and the child are kLIBC processes (not a wise decision to my taste, I've seen too many problems because of that already). And this is where handling of response files breaks for some reason. More debugging is needed but no time for that right now.
@dryeo commented on GitHub (Apr 14, 2020):
On 04/14/20 05:06 AM, Dmitriy Kuminov wrote:
Never had a chance to examine |@k:\var\temp/ccDLEvol| as it is deleted
right away. The corresponding one from GCC 4.92 has each object file and
GCC command on its own line.
The emxomfld command only works without the response file.
@dmik commented on GitHub (Apr 15, 2020):
Closing in favor of the above ticket.