This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Importing gnulib into the gcc tree


Hey, 
As a first step of my GSOC project (https://gcc.gnu.org/wiki/replacelibibertywithgnulib) I have imported the gnulib library inside the gcc tree. I have created gnulib as a top level directory which contains the necessary scripts to import the modules. It also contains the necessary Makefile.in and configure.ac files. 
I have made the corresponding changes in the Makefile.def and configure.ac files, adding gnulib both as a build and host library, and subsequently regenerated the Makefile.in and configure files. 

In order to show the setup works, I’ve replaced libiberty’s version by obstack by gnulib’s. This was made possible by replacing the corresponding header file and then including gnulib headers and gnulib static library in the build path required to compile gcc files.

Used gdb’s scripts to import gnulib
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=tree;f=gdb/gnulib;h=cdf326774716ae427dc4fb47c9a410fcdf715563;hb=HEAD ;


7-7-16 Ayush Goel <ayushgoel1610@gmail.com>

		* Makefile.def: Added gnulib as build & host library and dependency of all-gcc on gnulib
		* Makefile.in: regenerated
		* configure.ac: Added gnulib as build and host library
		* configure: regenerated
		* gnulib: created directory
		* gnulib/Makefile.in: new file
		* gnulib/configure.ac: new file
		* gnulib/update-gnulib.sh: script to import gnulib modules using gnulib-tool
		* gnulib/import: created by update-gnulib.sh
		* gnulib/import/Makefile.in: imported from gnulib 
       		* gnulib/import/alignof.h: Imported from gnulib 
		* gnulib/import/exitfail.c: Imported from gnulib 
		* gnulib/import/exitfail.h: Imported from gnulib 
		* gnulib/import/extra: Imported from gnulib 
		* gnulib/import/extra/snippet: Imported from gnulib 
		* gnulib/import/extra/snippet/_Noreturn.h: Imported from gnulib 
		* gnulib/import/extra/snippet/arg-nonnull.h: Imported from gnulib 
		* gnulib/import/extra/snippet/c++defs.h: Imported from gnulib 
		* gnulib/import/extra/snippet/warn-on-use.h: Imported from gnulib 
		* gnulib/import/gettext.h: Imported from gnulib 
		* gnulib/import/m4: Imported from gnulib 
		* gnulib/import/m4/00gnulib.m4: Imported from gnulib 
		* gnulib/import/m4/absolute-header.m4: Imported from gnulib 
		* gnulib/import/m4/extern-inline.m4: Imported from gnulib 
		* gnulib/import/m4/gnulib-cache.m4: Imported from gnulib 
		* gnulib/import/m4/gnulib-common.m4: Imported from gnulib 
		* gnulib/import/m4/gnulib-comp.m4: Imported from gnulib 
		* gnulib/import/m4/gnulib-tool.m4: Imported from gnulib 
		* gnulib/import/m4/include_next.m4: Imported from gnulib 
		* gnulib/import/m4/longlong.m4: Imported from gnulib 
		* gnulib/import/m4/multiarch.m4: Imported from gnulib 
		* gnulib/import/m4/obstack.m4: Imported from gnulib 
		* gnulib/import/m4/off_t.m4: Imported from gnulib 
		* gnulib/import/m4/ssize_t.m4: Imported from gnulib 
		* gnulib/import/m4/stddef_h.m4: Imported from gnulib 
		* gnulib/import/m4/stdint.m4: Imported from gnulib 
		* gnulib/import/m4/stdlib_h.m4: Imported from gnulib 
		* gnulib/import/m4/sys_types_h.m4: Imported from gnulib 
		* gnulib/import/m4/unistd_h.m4: Imported from gnulib 
		* gnulib/import/m4/warn-on-use.m4: Imported from gnulib 
		* gnulib/import/m4/wchar_t.m4: Imported from gnulib 
		* gnulib/import/obstack.c: Imported from gnulib 
		* gnulib/import/obstack.h: Imported from gnulib 
		* gnulib/import/stddef.in.h: Imported from gnulib 
		* gnulib/import/stdint.in.h: Imported from gnulib 
		* gnulib/import/stdlib.in.h: Imported from gnulib 
		* gnulib/import/sys: Imported from gnulib 
		* gnulib/import/sys_types.in.h: Imported from gnulib 
		* gnulib/import/unistd.c: Imported from gnulib 
		* gnulib/import/unistd.in.h: Imported from gnulib 
		* gnulib/stamp-h1: generated
		
		

 

--  
Thanks,  
Ayush Goel

On 27 June 2016 at 11:22:38 PM, Joseph Myers (joseph@codesourcery.com) wrote:
> On Sat, 25 Jun 2016, ayush goel wrote:
>  
> > Initially I have just imported the bcopy module from gnulib which will
> > eventually replace gcc’s dependency on libiberty’s bcopy.
>  
> GCC should not depend on bcopy. Any bcopy use is a bug and it should be
> replaced by memcpy or memmove as appropriate. The poisoning in system.h
> should prevent such uses from building in the first place.
>  
> You should only import gnulib modules for functionality actually used in
> GCC - remembering that GCC now depends on at least a C++98 compiler and
> library, so it's unlikely that modules for ISO C90 functionality are
> actually relevant on any currently supported host or build system.
>  
> For example, GCC uses obstacks, so the gnulib version of obstack is
> appropriate to replace the libiberty version.
>  
> --
> Joseph S. Myers
> joseph@codesourcery.com

Attachment: importgnulib_7_7
Description: Binary data


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]