When compiled with its vailla Makefiles, suite 3270 does not take into account the currently defined CFLAGS. $ emerge --info | grep CFLAGS emerge --info | grep CFLAGS CFLAGS="-O3 -pipe -march=native -fomit-frame-pointer -fopt-info-vec -mindirect-branch=thunk -mindirect-branch-register" Sample coming from the build of c3270 (other parts of Suite 3270 exhibits this): $ make c3270 (...) cc -Wall -Wsign-compare -std=c99 -pedantic -Wno-variadic-macros -MMD -MP -I../../../lib/32xx -I../../../lib/32xx/../include/unix -I../../../lib/32xx/../include -I../../../include -DLIBX3270DIR=\"/usr/local/etc/x3270\" -D_POSIX_SOURCE -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_XOPEN_SOURCE -c -o asprintf.o ../../../Common/asprintf.c gcc -Wall -Wsign-compare -std=c99 -pedantic -Wno-variadic-macros -MMD -MP -I../../../lib/32xx -I../../../lib/32xx/../include/unix -I../../../lib/32xx/../include -I../../../include -DLIBX3270DIR=\"/usr/local/etc/x3270\" -D_POSIX_SOURCE -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_XOPEN_SOURCE -c -o indent_s.o ../../../Common/indent_s.c gcc -Wall -Wsign-compare -std=c99 -pedantic -Wno-variadic-macros -MMD -MP -I../../../lib/32xx -I../../../lib/32xx/../include/unix -I../../../lib/32xx/../include -I../../../include -DLIBX3270DIR=\"/usr/local/etc/x3270\" -D_POSIX_SOURCE -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_XOPEN_SOURCE -c -o lazya.o ../../../Common/lazya.c (...) In that case the problem comes from c3270/Makefile.obj.in and lies in the line 55: CFLAGS = $(CCOPTIONS) $(CDEBUGFLAGS) $(XCPPFLAGS) that line should be like this: CFLAGS = $(CCOPTIONS) $(CDEBUGFLAGS) $(XCPPFLAGS) @CFLAGS@ Once corrected we do have the correct GCC options set we see the correct value in the generated Makefile.obj: CFLAGS = $(CCOPTIONS) $(CDEBUGFLAGS) $(XCPPFLAGS) -O3 -pipe -march=native -fomit-frame-pointer -fopt-info-vec -mindirect-branch=thunk -mindirect-branch-register True for c3270, true for the others "UN*X" components of Suite 3270. Grep'ing from Suite 3270 source directory gives: $ grep -ri 'CFLAGS = $(CCOPTIONS) $(CDEBUGFLAGS) $(XCPPFLAGS)' * c3270/Makefile.obj.in:CFLAGS = $(CCOPTIONS) $(CDEBUGFLAGS) $(XCPPFLAGS) lib/3270/Makefile.obj.in:CFLAGS = $(CCOPTIONS) $(CDEBUGFLAGS) $(XCPPFLAGS) lib/3270stubs/Makefile.obj.in:CFLAGS = $(CCOPTIONS) $(CDEBUGFLAGS) $(XCPPFLAGS) lib/32xx/Makefile.obj.in:CFLAGS = $(CCOPTIONS) $(CDEBUGFLAGS) $(XCPPFLAGS) lib/3270i/Makefile.obj.in:CFLAGS = $(CCOPTIONS) $(CDEBUGFLAGS) $(XCPPFLAGS) pr3287/Makefile.obj.in:CFLAGS = $(CCOPTIONS) $(CDEBUGFLAGS) $(XCPPFLAGS) \ s3270/Makefile.obj.in:CFLAGS = $(CCOPTIONS) $(CDEBUGFLAGS) $(XCPPFLAGS) tcl3270/Makefile.obj.in:CFLAGS = $(CCOPTIONS) $(CDEBUGFLAGS) $(XCPPFLAGS) x3270/Makefile.obj.in:CFLAGS = $(CCOPTIONS) $(CDEBUGFLAGS) $(XCPPFLAGS) The solution is simple: add @CFLAGS@ at the end of the above lines. Issue seen with net-misc/suite3270-3.3.5_p12 and net-misc/suite3270-3.3.6_p8
Created attachment 635568 [details, diff] Patch for suite3270-3.6_p8.ebuild This patch makes the ebuild eapply a serie of patches.
Created attachment 635574 [details, diff] Fix for 'CFILES=' statements in Makefiles This patch implements the solution given in the bug description as a first approach. It simply changes how the CFLAGS is initialized in several Makefiles. Place this patch in the subdirectory "files/patches" instead of "patches" as the ebuild (see separate patch) calls eapply.
this is fixed in the 4.0 series if you're able to write patches for the source, could you send them to the upstream project ? the developers there are quite friendly.
Yes sure, in that case I had exchanges with the author some months ago notably for the issue of having libtinfo wrongly referenced (see bug #713618), he is very friendly and open to enhancements however on my side I had no time to make a proposal on an updated ebuild for 4.x as a follow up.
(In reply to Adrien Dessemond from comment #4) that's fine. if you want to focus on getting upstream into a good state, you can just drop us a note afterwards (file a FYI bug). if you don't have the time to update Gentoo stuff, someone else can.