mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-15 14:16:07 -06:00
ide: PORTABLE_HYBRID
This commit is contained in:
parent
4544393d53
commit
2f2f7a4af6
3 changed files with 28 additions and 15 deletions
|
|
@ -13,5 +13,6 @@ file
|
|||
mainconfig
|
||||
"" = "GUI",
|
||||
"" = "GUI FORCE_CSD",
|
||||
"" = "GUI X11";
|
||||
"" = "GUI X11",
|
||||
"" = "GUI X11 PORTABLE_HYBRID";
|
||||
|
||||
|
|
|
|||
|
|
@ -8,6 +8,8 @@ uses
|
|||
|
||||
library(WIN32) "advapi32 comdlg32 comctl32 imm32";
|
||||
|
||||
library(PORTABLE_HYBRID) "brotlidec brotlicommon bz2 Xau";
|
||||
|
||||
pkg_config(POSIX !OSX !VIRTUALGUI) "freetype2 x11 xinerama xrender xft xdmcp fontconfig xcb xext";
|
||||
|
||||
pkg_config(POSIX !X11 !OSX !VIRTUALGUI) "gtk+-3.0 libnotify";
|
||||
|
|
|
|||
|
|
@ -505,6 +505,7 @@ bool GccBuilder::Link(const Vector<String>& linkfile, const String& linkoptions,
|
|||
return CreateLib(ForceExt(target, ".a"), linkfile, Vector<String>(), Vector<String>(), linkoptions);
|
||||
|
||||
int time = msecs();
|
||||
bool portable = HasFlag("PORTABLE_HYBRID");
|
||||
#ifdef PLATFORM_OSX
|
||||
CocoaAppBundle();
|
||||
#endif
|
||||
|
|
@ -518,6 +519,9 @@ bool GccBuilder::Link(const Vector<String>& linkfile, const String& linkoptions,
|
|||
lnk << " -m32";
|
||||
if(HasFlag("DLL"))
|
||||
lnk << " -shared";
|
||||
if(portable)
|
||||
lnk << " -static-libstdc++ -static-libgcc -Wl,-Bstatic";
|
||||
else
|
||||
if(!HasFlag("SHARED") && !HasFlag("SO"))
|
||||
lnk << " -static";
|
||||
if(HasFlag("WINCE"))
|
||||
|
|
@ -580,6 +584,9 @@ bool GccBuilder::Link(const Vector<String>& linkfile, const String& linkoptions,
|
|||
for(int pass = 0; pass < 2; pass++) {
|
||||
for(i = 0; i < lib.GetCount(); i++) {
|
||||
String ln = lib[i];
|
||||
if(portable && (ln == "dl" || ln == "pthread" || ln == "rt"))
|
||||
continue;
|
||||
|
||||
String ext = ToLower(GetFileExt(ln));
|
||||
|
||||
// unix shared libs shall have version number AFTER .so (sic)
|
||||
|
|
@ -610,6 +617,9 @@ bool GccBuilder::Link(const Vector<String>& linkfile, const String& linkoptions,
|
|||
if(pass == 1 && !HasFlag("SOLARIS") && !HasFlag("OSX"))
|
||||
lnk << " -Wl,--end-group";
|
||||
}
|
||||
if(portable)
|
||||
lnk << " -Wl,-Bdynamic -lpthread -ldl -lrt";
|
||||
|
||||
PutConsole("Linking...");
|
||||
bool error = false;
|
||||
CustomStep(".pre-link", Null, error);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue