Skip to contentSkip to conversation

Mac: your linker does not support --whole-archive or -z

Qemu-devel C.W. Betts 4 participants 7 messages May 19, 2009 – May 27, 2009

lore
Share & tools
lore

C.W. Betts

author
#0 lore raw

I recently got my git tree up and running again, but I encountered this error when trying to configure it:
Error: your linker does not support --whole-archive or -z.
Please report to [email protected]

I'm running Mac OS X 10.5.7

#1 lore raw
Quoted 5 lines · C.W. Betts

I recently got my git tree up and running again, but I encountered this error when trying to configure it:
Error: your linker does not support --whole-archive or -z.
Please report to [email protected]

I'm running Mac OS X 10.5.7

Can someone point me to the manual for the OS X linker? I'm surprised it's not GNU ld...

Regards,

Anthony Liguori

Quoted 3 lines
#2 lore raw

Am 19.05.2009 um 20:40 schrieb Anthony Liguori:

Quoted 8 lines
Quoted 5 lines · C.W. Betts

I recently got my git tree up and running again, but I encountered this error when trying to configure it:
Error: your linker does not support --whole-archive or -z.
Please report to [email protected]

I'm running Mac OS X 10.5.7

Can someone point me to the manual for the OS X linker? I'm surprised it's not GNU ld...

I told you in advance...

Andreas

#3 lore raw
In reply to C.W. Betts
Quoted 5 lines · C.W. Betts

I recently got my git tree up and running again, but I encountered this error when trying to configure it:
Error: your linker does not support --whole-archive or -z.
Please report to [email protected]

I'm running Mac OS X 10.5.7

Does this patch help? Make sure to do configure and a full build.

Regards,

Anthony Liguori

Quoted 3 lines
configure +5 -0
index 4111e7c..533fa35 100755
@@ -1708,6 +1708,11 @@ elif check_linker_flags -z,allextract -z,defaultextract ; then
     # Solaris ld
     echo "ARLIBS_BEGIN=-Wl,-z,allextract" >> $config_mak
     echo "ARLIBS_END=-Wl,-z,defaultextract" >> $config_mak
+elif check_linker_flags -all_load ; then
+    echo "ARLIBS_BEGIN=-all_load" >> $config_mak
+    # This is technically obsolete but it seems like it would be necessary
+#    echo "ARLIBS_END=-noall_load" >> $config_mak
+    echo "ARLIBS_END=" >> $config_mak
 else
     echo "Error: your linker does not support --whole-archive or -z."
     echo "Please report to [email protected]"
author
#4 lore raw
Quoted 8 lines · Anthony Liguori
Quoted 5 lines · C.W. Betts

I recently got my git tree up and running again, but I encountered this error when trying to configure it:
Error: your linker does not support --whole-archive or -z.
Please report to [email protected]

I'm running Mac OS X 10.5.7

Does this patch help? Make sure to do configure and a full build.

for some odd reason, it needs two -all_load in order to work. Like so:

configure +5 -0
index 4111e7c..533fa35 100755
@@ -1708,6 +1708,11 @@ elif check_linker_flags -z,allextract -z,defaultextract ; then
    # Solaris ld
    echo "ARLIBS_BEGIN=-Wl,-z,allextract" >> $config_mak
    echo "ARLIBS_END=-Wl,-z,defaultextract" >> $config_mak
+elif check_linker_flags -all_load -all_load ; then
+    echo "ARLIBS_BEGIN=-all_load" >> $config_mak
+    # This is technically obsolete but it seems like it would be necessary
+#    echo "ARLIBS_END=-noall_load" >> $config_mak
+    echo "ARLIBS_END=" >> $config_mak

else
echo "Error: your linker does not support --whole-archive or -z." echo "Please report to [email protected]"

Quoted 28 lines

Regards,

Anthony Liguori

Quoted 3 lines
configure +0 -0
index 4111e7c..533fa35 100755
@@ -1708,6 +1708,11 @@ elif check_linker_flags -z,allextract - 

z,defaultextract ; then
# Solaris ld
echo "ARLIBS_BEGIN=-Wl,-z,allextract" >> $config_mak echo "ARLIBS_END=-Wl,-z,defaultextract" >> $config_mak

configure +3 -0
+elif check_linker_flags -all_load ; then
+    echo "ARLIBS_BEGIN=-all_load" >> $config_mak
+    # This is technically obsolete but it seems like it would be  

necessary

configure +2 -0
+#    echo "ARLIBS_END=-noall_load" >> $config_mak
+    echo "ARLIBS_END=" >> $config_mak

else
echo "Error: your linker does not support --whole-archive or -z." echo "Please report to [email protected]"

#5 lore raw
Quoted 3 lines · C.W. Betts
Quoted 2 lines

Does this patch help? Make sure to do configure and a full build.

for some odd reason, it needs two -all_load in order to work. Like so:

check_linker_flags needs to be smarter... But with -all_load, QEMU compiles and things work as you'd expect? Can you verify that qemu-img help output shows multiple supported formats?

#6 lore raw
Quoted 8 lines · Anthony Liguori
Quoted 3 lines · C.W. Betts
Quoted 2 lines

Does this patch help? Make sure to do configure and a full build.

for some odd reason, it needs two -all_load in order to work. Like so:

check_linker_flags needs to be smarter... But with -all_load, QEMU compiles and things work as you'd expect? Can you verify that qemu-img help output shows multiple supported formats?

Looks good with -all_load.

Alex