Created attachment 166538 [details] Proposed patch for x11-toolkits/scintilla (since 402317 revision) Patch to update x11-toolkits/scintilla and editors/scite ports from 3.6.2 to 3.6.3 version. Look following link for changes: http://www.scintilla.org/ScintillaHistory.html x11-toolkits/scintilla: - Update files/patch-makefile - Add a sed patch to remove used PICFLAGS define from provided gtk/makefile, which makes it possible to differentiate between "-fPIC" and "-fpic" flags as it was before 3.6.3 version, based on processor architecture in port's Makefile I'm not sure about sed patch for PICFLAGS define, but there are various changes related to "-fPIC" and/or "-fpic" flags in svn history of x11-toolkits/scintilla port: - "Update to 1.38" (removal of -fPIC flag): https://svnweb.freebsd.org/ports/head/x11-toolkits/scintilla/files/patch-makefile?r1=41542&r2=43584 - "Fix build on sparc64 by not adding -fpic to CFLAGS": https://svnweb.freebsd.org/ports/head/x11-toolkits/scintilla/Makefile?r1=106784&r2=127988 - "Add -fPIC to CFLAGS to fix the build on amd64": https://svnweb.freebsd.org/ports/head/x11-toolkits/scintilla/Makefile?r1=127988&r2=145528 - "Make sure the PIC CFLAGS are properly used for all objects": https://svnweb.freebsd.org/ports/head/x11-toolkits/scintilla/files/patch-makefile?r1=127988&r2=145531 - "Fix linking and sparc64 build; small clean-up": https://svnweb.freebsd.org/ports/head/x11-toolkits/scintilla/Makefile?r1=281243&r2=281725 According to these svn logs and current GCC manual documentation (https://gcc.gnu.org/onlinedocs/gcc-5.3.0/gcc/Code-Gen-Options.html#index-fpic-2808), there are actual differences between "-fPIC" and "-fpic" flags, therefore I decided to propose a sed patch for what it was before 3.6.3 version.
Created attachment 166539 [details] Proposed patch for editors/scite (since 402318 revision)
Created attachment 166540 [details] The poudriere testport log (FreeBSD 10.2 amd64): x11-toolkits/scintilla
Created attachment 166541 [details] The poudriere testport log (FreeBSD 10.2 amd64): editors/scite
I've already submitted this update as bug #206751 albeit without the edit for the PIC flags in the scintilla port. I'll ask for this bug to be closed because I already submitted it, but is the PIC flags patch absolutely necessary? There were no issues with building it for amd64 or i386.
Hello, Naram Qashat. (In reply to comment #4) > I've already submitted this update as bug #206751 albeit without the edit for > the PIC flags in the scintilla port. Sorry, I didn't see this on PortsMon on time of checking the port update (may be because of outdated information): http://portsmon.freebsd.org/portoverview.py?category=x11-toolkits&portname=scintilla (In reply to comment #4) > I'll ask for this bug to be closed because I already submitted it, but is the > PIC flags patch absolutely necessary? There were no issues with building it > for amd64 or i386. Sure, I can close it or it could be marked as duplicate of bug #206751. I also didn't have issues on amd64 for build and run without changes for PIC flags, but after reading the build log I found "-fPIC" added, along with "-DPIC -fpic", which was strange from the logic of the port's Makefile. Then I found following commit, which was cause of this: http://sourceforge.net/p/scintilla/code/ci/255c6d20fa88b2aa1ebbc67c0a139f6f1595d126/ After reading parts of GCC documentation, the svn logs for x11-toolkits/scintilla port, related to sparc64 architecture, I decided to propose current solution. Unfortunately, I can't test this on other architectures to be sure. Anyway, there is a possibility to use the proposed sed patch for PICFLAGS define, if you find it useful.
*** This bug has been marked as a duplicate of bug 206751 ***
I created following test case, based on GCC manual documentation: -8<-- #include <stdio.h> int main() { printf("__pic__ = %d, __PIC__ = %d\n", __pic__, __PIC__); return 0; } -->8- And run it with following configurations: % cc -fpic test.c -o test && ./test __pic__ = 1, __PIC__ = 1 % cc -fPIC test.c -o test && ./test __pic__ = 2, __PIC__ = 2 % cc -fPIC -fpic test.c -o test && ./test __pic__ = 1, __PIC__ = 1 % cc -fpic -fPIC test.c -o test && ./test __pic__ = 2, __PIC__ = 2 In result, the last option (either -fpic or -fPIC) was used. If this is how it works, then it should be ok for x11-toolkits/scintilla port, as long as port's CFLAGS applied last (and this is current case).