Hi all,

Can gatekeeper help review this fix?
For more detailed info please refer to
https://bugs.open64.net/show_bug.cgi?id=782

In general, when run following command,
opencc -m elf_i386 -O0 -m32 a.c b.c -c
opencc -o a.so    -m elf_i386 a.o b.o   -shared -nostdlib -show
It will generate 64bit a.so but not 32bit.

The root reason is when open64 pass "-m" "elf_i386" and "-m"
"elf_x86_64" to linker, it
treat them as  group "-m elf_i386", and "-m elf_x86_64", which confused the gcc
driver.


The fix is:
===================================================================
--- phases.c    (revision 3635)
+++ phases.c    (working copy)
@@ -3115,10 +3115,12 @@
 #ifdef KEY
        // Pass "-m elf_i386" and "-m elf_x86_64" to linker.  Bug 8441.
        if (option_was_seen(O_melf_i386)) {
-           add_string(args, "-m elf_i386");
+          add_string(args, "-m");
+          add_string(args, "elf_i386");
        }
        if (option_was_seen(O_melf_x86_64)) {
-           add_string(args, "-m elf_x86_64");
+          add_string(args, "-m");
+          add_string(args, "elf_x86_64");
        }
 #endif
        if (ipa == TRUE) {

Thanks
zhuqing

------------------------------------------------------------------------------
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
_______________________________________________
Open64-devel mailing list
Open64-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/open64-devel

Reply via email to