Skip to content
Permalink
Browse files

Do not link the Linux overlay with '-z now'.

Linking the overlay library with '-z now' requires all target
processes to have libGL symbols in them at load time.
If it doesn't, the program will not start at all.

Instead, explicitly use '-z lazy' to defer libGL symbol resolution
until first use, which is never for non-libGL users.
  • Loading branch information...
mkrautz committed Jun 5, 2015
1 parent 7e4639c commit 859da4dabec070959b5c06f8d32512990d7ec9c2
Showing with 4 additions and 0 deletions.
  1. +4 −0 overlay_gl/overlay_gl.pro
@@ -19,6 +19,10 @@ unix:!macx {
LIBS *= -lrt -ldl
QMAKE_CFLAGS *= -fvisibility=hidden $(CFLAGS_ADD)
QMAKE_LFLAGS -= -Wl,--no-undefined

QMAKE_LFLAGS -= -Wl,-z,now

This comment has been minimized.

Copy link
@Kissaki

Kissaki Jan 18, 2018

Member

Why is it necessary to remove it (first)?

This comment has been minimized.

Copy link
@mkrautz

mkrautz Jan 18, 2018

Author Member

I believe it is added by Qt’s mkspec.

QMAKE_LFLAGS += -Wl,-z,lazy

QMAKE_LFLAGS *= $(LFLAGS_ADD)
equals(QMAKE_LINK,g++) {
QMAKE_LINK = gcc

0 comments on commit 859da4d

Please sign in to comment.
You can’t perform that action at this time.