diorcety / crosstool-ng

crosstool-ng fork with the full support of Darwin/Linux/Windows as build and host machine
Other
33 stars 15 forks source link

windows target never generates shared libraries #12

Open class101 opened 10 years ago

class101 commented 10 years ago

It is impossible to have CT_SHARED_LIBS under Windows and so on, whether you choose Static or not in the menuconfig for Windows, the shared libs are never done because of this in the final core compiler and one or two other locations,

I don't understand because it seems the original crosstool-ng also does have this issue so nobody really builds shared libs in Windows ??

    [ "${CT_SHARED_LIBS}" = "y" ] || extra_config+=("--disable-shared")

So instead of setting --enable-shared over the disable option in an extra config and guess if it is accepted or not I do

Index: config/kernel/windows.in
--- config/kernel/windows.in.orig   2014-01-22 02:13:21.908067800 +0100
+++ config/kernel/windows.in        2014-01-22 02:13:40.415521900 +0100
@@ -3,5 +3,6 @@
 ## depends on ARCH_x86
 ##
 ## select WINDOWS
+## select KERNEL_SUPPORTS_SHARED_LIBS
 ##
 ## help Build a toolchain targeting systems running Windows as host

Then I'm allowed to have CT_SHARED_LIBS=y on windows

Without it is impossible to get the dll compiled, you can try, uncheck the static option in gcc, uncheck the static one in the toolchains options, the shared dll are never compiled because --disable-shared is always applied and forbids the default behaviour of gcc which is to generate shared libs

mingwandroid commented 10 years ago

Interesting. I will look into this once I get everything else finished.