The -g flag should be dropped from the build [...] cd jwwlib/ && make -f Makefile make[2]: Entering directory `/var/tmp/portage/media-gfx/librecad-2.0.3/work/LibreCAD-2.0.3/libraries/jwwlib' x86_64-pc-linux-gnu-g++ -c -O2 -pipe -std=c++11 -g -Wall -W -fPIC -D_REENTRANT -DQT_NO_DEBUG -DQT_SVG_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtSvg -I/usr/include/qt4 -I../../generated/lib/jwwlib/moc -o ../../generated/lib/jwwlib/obj/dl_writer_ascii.o src/dl_writer_ascii.cpp [...]
In file 'common.pri' there is definition: QMAKE_CXXFLAGS_DEBUG += -std=c++11 -g QMAKE_CXXFLAGS += -std=c++11 -g which makes a '-g' flag obligatory in any case (debug and release). I don't see any sense of this, but I'd like to ask upstream before patching that.
That prevents the user from using other debug flag, for instance: CXXFLAGS="-ggdb" emerge -1 librecad x86_64-pc-linux-gnu-g++ -c -ggdb -std=c++11 -g -Wall -W -fPIC -D_REENTRANT -DQT_NO_DEBUG -DQT_SVG_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtSvg -I/usr/include/qt4 -I../../generated/lib/jwwlib/moc -o ../../generated/lib/jwwlib/obj/dl_writer_ascii.o src/dl_writer_ascii.cpp Would use -g rather than -ggdb