CVS commit: src/external/gpl3/gcc/lib/liblto_plugin
Module Name:src Committed By: kamil Date: Sat Nov 11 07:50:39 UTC 2017 Modified Files: src/external/gpl3/gcc/lib/liblto_plugin: Makefile Log Message: Build liblto_plugin.so with safe-ctype.c This corrects linking attempt with GNU binutils GOLD (linker). ld.gold: error: /usr/libexec/liblto_plugin.so: \ could not load plugin library: /usr/libexec/liblto_plugin.so: \ Undefined symbol "_sch_istable" (symnum = 12) Keep the same minor for the previous recent bump. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/external/gpl3/gcc/lib/liblto_plugin/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl3/gcc/lib/liblto_plugin/Makefile diff -u src/external/gpl3/gcc/lib/liblto_plugin/Makefile:1.7 src/external/gpl3/gcc/lib/liblto_plugin/Makefile:1.8 --- src/external/gpl3/gcc/lib/liblto_plugin/Makefile:1.7 Sun Nov 5 02:36:00 2017 +++ src/external/gpl3/gcc/lib/liblto_plugin/Makefile Sat Nov 11 07:50:39 2017 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.7 2017/11/05 02:36:00 kamil Exp $ +# $NetBSD: Makefile,v 1.8 2017/11/11 07:50:39 kamil Exp $ .include .include @@ -11,7 +11,8 @@ GNUHOSTDIST= ${DIST} SRCS= lto-plugin.c hashtab.c simple-object.c pex-unix.c \ pex-common.c argv.c make-temp-file.c concat.c \ simple-object-elf.c simple-object-mach-o.c \ - simple-object-coff.c simple-object-xcoff.c xstrerror.c + simple-object-coff.c simple-object-xcoff.c xstrerror.c \ + safe-ctype.c CPPFLAGS+= -I${DIST}/include -I. CPPFLAGS+= -DHAVE_CONFIG_H
CVS commit: src/external/gpl3/gcc/lib/liblto_plugin
Module Name:src Committed By: kamil Date: Sun Nov 5 02:36:00 UTC 2017 Modified Files: src/external/gpl3/gcc/lib/liblto_plugin: Makefile Log Message: Backport patch from gcc.old for liblto_plugin Correct resolution of xstrerror(). Switch from -liberty (which has PIC problems as a local library) to directly linking xstrerror.c with liblto_plugin. Fix in gcc.old by PR 52674 by myself To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/external/gpl3/gcc/lib/liblto_plugin/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl3/gcc/lib/liblto_plugin/Makefile diff -u src/external/gpl3/gcc/lib/liblto_plugin/Makefile:1.6 src/external/gpl3/gcc/lib/liblto_plugin/Makefile:1.7 --- src/external/gpl3/gcc/lib/liblto_plugin/Makefile:1.6 Sat Nov 4 16:21:49 2017 +++ src/external/gpl3/gcc/lib/liblto_plugin/Makefile Sun Nov 5 02:36:00 2017 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.6 2017/11/04 16:21:49 kamil Exp $ +# $NetBSD: Makefile,v 1.7 2017/11/05 02:36:00 kamil Exp $ .include .include @@ -11,7 +11,7 @@ GNUHOSTDIST= ${DIST} SRCS= lto-plugin.c hashtab.c simple-object.c pex-unix.c \ pex-common.c argv.c make-temp-file.c concat.c \ simple-object-elf.c simple-object-mach-o.c \ - simple-object-coff.c simple-object-xcoff.c + simple-object-coff.c simple-object-xcoff.c xstrerror.c CPPFLAGS+= -I${DIST}/include -I. CPPFLAGS+= -DHAVE_CONFIG_H @@ -31,10 +31,6 @@ LIBDIR= /usr/libexec SHLIB_MAJOR= 0 SHLIB_MINOR= 1 -LIBIBERTYDIR!= cd ${.CURDIR}/../../lib/libiberty && ${PRINTOBJDIR} -LDADD+= -L${LIBIBERTYDIR} -liberty -DPADD+= ${LIBIBERTYDIR}/libiberty.a - # Yuck, we have to run configure to generate this one... CLEANFILES+= config.h HOST_CFLAGS+= -I${.OBJDIR}
CVS commit: src/external/gpl3/gcc/lib/liblto_plugin
Module Name:src Committed By: kamil Date: Sat Nov 4 16:03:12 UTC 2017 Modified Files: src/external/gpl3/gcc/lib/liblto_plugin: Makefile Log Message: Link liblto_plugin with -liberty (gcc) GCC passes liblto_plugin.so in the linker invocation (part of "gcc -v file.c"): ld -plugin /usr/libexec/liblto_plugin.so -plugin-opt=/usr/libexec/lto-wrapper \ -plugin-opt=-fresolution=/var/tmp//ccxda9Ar.res \ -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc \ -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc_s \ -plugin-opt=-pass-through=-lgcc --eh-frame-hdr -dc -dp -e _start \ -dynamic-linker /usr/libexec/ld.elf_so /usr/lib/crt0.o /usr/lib/crti.o \ /usr/lib/crtbegin.o /var/tmp//cc7A7mOK.o --as-needed -lgcc_s --no-as-needed \ -lgcc -lc --as-needed -lgcc_s --no-as-needed -lgcc /usr/lib/crtend.o \ /usr/lib/crtn.o When attempting to use GNU GOLD, liblto_plugin.so cannot be used because it \ has missing symbol xstrerror: ld: error: /usr/libexec/liblto_plugin.so: could not load plugin library: \ /usr/libexec/liblto_plugin.so: Undefined PLT symbol "xstrerror" (symnum = 38) >From Makefiles and sources inspection, liblto_plugin.so shall be linked with \ libiberty (-liberty), a utility GNU library for internal usage with helping \ functions. PR 52674 by myself To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/external/gpl3/gcc/lib/liblto_plugin/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl3/gcc/lib/liblto_plugin/Makefile diff -u src/external/gpl3/gcc/lib/liblto_plugin/Makefile:1.4 src/external/gpl3/gcc/lib/liblto_plugin/Makefile:1.5 --- src/external/gpl3/gcc/lib/liblto_plugin/Makefile:1.4 Wed Apr 20 17:18:52 2016 +++ src/external/gpl3/gcc/lib/liblto_plugin/Makefile Sat Nov 4 16:03:12 2017 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.4 2016/04/20 17:18:52 christos Exp $ +# $NetBSD: Makefile,v 1.5 2017/11/04 16:03:12 kamil Exp $ .include .include @@ -31,6 +31,10 @@ LIBDIR= /usr/libexec SHLIB_MAJOR= 0 SHLIB_MINOR= 0 +LIBIBERTYDIR!= cd ${.CURDIR}/../../lib/libiberty && ${PRINTOBJDIR} +LDADD+= -L${LIBIBERTYDIR} -liberty +DPADD+= ${LIBIBERTYDIR}/libiberty.a + # Yuck, we have to run configure to generate this one... CLEANFILES+= config.h HOST_CFLAGS+= -I${.OBJDIR}
CVS commit: src/external/gpl3/gcc/lib/liblto_plugin
Module Name:src Committed By: christos Date: Wed Jan 7 02:06:23 UTC 2015 Modified Files: src/external/gpl3/gcc/lib/liblto_plugin: Makefile Log Message: fix build To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/external/gpl3/gcc/lib/liblto_plugin/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl3/gcc/lib/liblto_plugin/Makefile diff -u src/external/gpl3/gcc/lib/liblto_plugin/Makefile:1.2 src/external/gpl3/gcc/lib/liblto_plugin/Makefile:1.3 --- src/external/gpl3/gcc/lib/liblto_plugin/Makefile:1.2 Sun Jun 1 16:24:45 2014 +++ src/external/gpl3/gcc/lib/liblto_plugin/Makefile Tue Jan 6 21:06:23 2015 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.2 2014/06/01 20:24:45 mrg Exp $ +# $NetBSD: Makefile,v 1.3 2015/01/07 02:06:23 christos Exp $ .include bsd.init.mk .include bsd.shlib.mk @@ -8,9 +8,15 @@ LIB= liblto_plugin DIST= ${GCCDIST} GNUHOSTDIST= ${DIST} -SRCS= lto-plugin.c - -CPPFLAGS+= -DHAVE_CONFIG_H -I${DIST}/include -I. +SRCS= lto-plugin.c hashtab.c simple-object.c pex-unix.c \ + pex-common.c argv.c make-temp-file.c concat.c \ + simple-object-elf.c simple-object-mach-o.c \ + simple-object-coff.c simple-object-xcoff.c + +CPPFLAGS+= -I${DIST}/include -I. +CPPFLAGS+= -DHAVE_CONFIG_H +CPPFLAGS+= -Dxstrdup=strdup -Dxexit=exit +CPPFLAGS+= -Dxcalloc=calloc -Dxmalloc=malloc -Dxrealloc=realloc LIBISMODULE= 1 USE_SHLIBDIR= yes @@ -38,7 +44,7 @@ config.h: Makefile CC=${HOST_CC:Q} CFLAGS=${HOST_CFLAGS:Q} \ MAKE=${MAKE:Q} \ CONFIG_SHELL=${HOST_SH:Q} \ - ${HOST_SH} ${DIST}/lto-plugin/configure \ + ${HOST_SH} ${DIST}/libiberty/configure \ --build=`${HOST_SH} ${GNUHOSTDIST}/config.guess` \ --host=`${HOST_SH} ${GNUHOSTDIST}/config.guess` \ --target=${MACHINE_GNU_PLATFORM} \ @@ -47,7 +53,7 @@ config.h: Makefile .include bsd.lib.mk -.PATH: ${DIST}/lto-plugin +.PATH: ${DIST}/lto-plugin ${DIST}/libiberty .else .include bsd.prog.mk # do nothing