Compiling source in /var/tmp/portage/app-misc/hddled-0.3/work ... /usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: /var/tmp/portage/app-misc/hddled-0.3/temp/ccHgkm46.o: in function `led': hddled.c:(.text+0x211): undefined reference to `XChangeKeyboardControl' /usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: hddled.c:(.text+0x21b): undefined reference to `XFlush' /usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: /var/tmp/portage/app-misc/hddled-0.3/temp/ccHgkm46.o: in function `main': hddled.c:(.text.startup+0x148): undefined reference to `XOpenDisplay' /usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: hddled.c:(.text.startup+0x2d6): undefined reference to `XCloseDisplay' collect2: error: ld returned 1 exit status * ERROR: app-misc/hddled-0.3::gentoo failed (compile phase): * (no error message) * * Call stack: * ebuild.sh, line 125: Called src_compile * environment, line 2039: Called die * The specific snippet of code: * $(tc-getCC) ${CFLAGS} -DX -lX11 -o x${PN} ${PN}.c ${LDFLAGS} || die; *
Created attachment 688632 [details] hddled-0.3:20210227-200653.log buildlog
CFLAGS="[...] -Wl,--as-needed" What is this doing in CFLAGS, will work if it's only in LDFLAGS