Skip to content

Commit

Permalink
qmake: add 'ldlibs_common' to Qt5 apps
Browse files Browse the repository at this point in the history
* add the '-lgcc' to ldlibs_common and use ldlibs_common
  also for qmake (as done by the other build systems)
* remove libgcc locating code for qmake

issue genodelabs#68
  • Loading branch information
ssumpf committed Nov 23, 2023
1 parent ecf9052 commit 9f94761
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
10 changes: 1 addition & 9 deletions share/goa/lib/build/qmake.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -45,19 +45,11 @@ proc create_or_update_build_dir { } {
append qmake_cflags "-I$build_dir/qmake_root/include/QtCore/spec/$qmake_platform"

set qmake_ldlibs { }
lappend qmake_ldlibs -nostdlib
lappend qmake_ldlibs -L$abi_dir
lappend qmake_ldlibs -l:libc.lib.so
lappend qmake_ldlibs -l:libm.lib.so
lappend qmake_ldlibs -l:stdcxx.lib.so
lappend qmake_ldlibs -l:qt5_component.lib.so

if {$arch == "x86_64"} {
lappend qmake_ldlibs [file normalize [exec $cross_dev_prefix\gcc -m64 -print-libgcc-file-name]]
} else {
lappend qmake_ldlibs [file normalize [exec $cross_dev_prefix\gcc -print-libgcc-file-name]]
}

set ::env(GENODE_QMAKE_CC) "${cross_dev_prefix}gcc"
set ::env(GENODE_QMAKE_CXX) "${cross_dev_prefix}g++"
set ::env(GENODE_QMAKE_LINK) "${cross_dev_prefix}g++"
Expand All @@ -66,7 +58,7 @@ proc create_or_update_build_dir { } {
set ::env(GENODE_QMAKE_NM) "${cross_dev_prefix}nm"
set ::env(GENODE_QMAKE_STRIP) "${cross_dev_prefix}strip"
set ::env(GENODE_QMAKE_CFLAGS) "$qmake_cflags"
set ::env(GENODE_QMAKE_LFLAGS_APP) "-nostdlib $ldflags $ldlibs_exe $qmake_ldlibs"
set ::env(GENODE_QMAKE_LFLAGS_APP) "-nostdlib $ldflags $ldlibs_common $ldlibs_exe $qmake_ldlibs"
set ::env(GENODE_QMAKE_LFLAGS_SHLIB) "-nostdlib $ldflags_so $ldlibs_common $ldlibs_so $qmake_ldlibs"


Expand Down
1 change: 1 addition & 0 deletions share/goa/lib/flags.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ lappend ldlibs_common -L$abi_dir

set ldlibs_exe { }
lappend ldlibs_exe -Wl,--dynamic-linker=ld.lib.so
lappend ldlibs_exe -Wl,-lgcc
#
# this is neeed so "main", "Component::construct" are dynamic symbols
# and ld.lib.so can find them
Expand Down

0 comments on commit 9f94761

Please sign in to comment.