mirror of
https://github.com/vale981/spectrwm
synced 2025-03-04 17:31:40 -05:00
Fix LD_PRELOAD error on Linux.
On 64-bit Linux systems, if LD_PRELOAD isn't a relative/absolute pathname to libswmhack.so, then ld.so attempts to load a 32-bit version for 32-bit programs. This produces an error message. The solution is to either build and install a 32-bit libswmhack.so.0.0 or use an absolute/relative path so that ld.so only loads libswmhack.so for 64-bit binaries. Fix Makefiles to set variables before they are referenced.
This commit is contained in:
parent
a91fc9f2e2
commit
b397ce68dc
2 changed files with 13 additions and 13 deletions
|
@ -1,16 +1,16 @@
|
|||
CFLAGS+= -std=c99 -Wmissing-prototypes -Wall -Wextra -Wshadow -Wno-uninitialized -g
|
||||
CFLAGS+= -D_GNU_SOURCE -I. -I/usr/include/freetype2 -DSWM_LIB=\"libswmhack.so.$(LVERS)\"
|
||||
LDADD+= -lX11 -lX11-xcb -lxcb -lxcb-icccm -lxcb-randr -lxcb-keysyms -lxcb-util -lxcb-xtest -lXft -lXcursor
|
||||
|
||||
PREFIX?= /usr/local
|
||||
BINDIR?= $(PREFIX)/bin
|
||||
LIBDIR?= $(PREFIX)/lib
|
||||
MANDIR?= $(PREFIX)/share/man
|
||||
|
||||
CC?= cc
|
||||
|
||||
LVERS= $(shell . ../lib/shlib_version; echo $$major.$$minor)
|
||||
|
||||
CFLAGS+= -std=c99 -Wmissing-prototypes -Wall -Wextra -Wshadow -Wno-uninitialized -g
|
||||
CFLAGS+= -D_GNU_SOURCE -I. -I/usr/include/freetype2 -DSWM_LIB=\"$(LIBDIR)/libswmhack.so.$(LVERS)\"
|
||||
LDADD+= -lX11 -lX11-xcb -lxcb -lxcb-icccm -lxcb-randr -lxcb-keysyms -lxcb-util -lxcb-xtest -lXft -lXcursor
|
||||
|
||||
CC?= cc
|
||||
|
||||
BUILDVERSION= $(shell sh $(CURDIR)/../buildver.sh)
|
||||
ifneq ("${BUILDVERSION}", "")
|
||||
CFLAGS+= -DSPECTRWM_BUILDSTR=\"$(BUILDVERSION)\"
|
||||
|
|
14
osx/Makefile
14
osx/Makefile
|
@ -1,3 +1,8 @@
|
|||
PREFIX?= /usr/local
|
||||
BINDIR?= $(PREFIX)/bin
|
||||
LIBDIR?= $(PREFIX)/lib
|
||||
MANDIR?= $(PREFIX)/share/man
|
||||
|
||||
# To use homebrew instead of macports, uncomment the following three lines.
|
||||
#INCFLAGS+= -I/opt/X11/include
|
||||
#LDADD+= -lX11 -lXcursor -lXft -L/opt/X11/lib
|
||||
|
@ -9,19 +14,14 @@ LDADD+= -L/opt/local/lib -lX11 -lXcursor -lXft
|
|||
|
||||
LDADD+= -lxcb-keysyms -lxcb-util -lxcb-randr -lX11-xcb -lxcb-xtest -lxcb -lxcb-icccm
|
||||
|
||||
LVERS= $(shell . ../lib/shlib_version; echo $$major.$$minor)
|
||||
|
||||
CFLAGS+= -std=c99 -Wmissing-prototypes -Wall -Wextra -Wshadow -Wno-uninitialized -g
|
||||
CFLAGS+= -O2 -D_GNU_SOURCE -D__OSX__ -I. -I.. ${INCFLAGS}
|
||||
CFLAGS+= -DSWM_LIB=\"$(LIBDIR)/libswmhack.so.$(LVERS)\"
|
||||
|
||||
PREFIX?= /usr/local
|
||||
BINDIR?= $(PREFIX)/bin
|
||||
LIBDIR?= $(PREFIX)/lib
|
||||
MANDIR?= $(PREFIX)/share/man
|
||||
|
||||
CC?= cc
|
||||
|
||||
LVERS= $(shell . ../lib/shlib_version; echo $$major.$$minor)
|
||||
|
||||
all: spectrwm libswmhack.so.$(LVERS)
|
||||
|
||||
spectrwm.c:
|
||||
|
|
Loading…
Add table
Reference in a new issue