[Mesa-dev] [PATCH 07/32] libgallium: Convert to automake

Tom Stellard tom at stellard.net
Thu Aug 30 06:53:46 PDT 2012


On Wed, Aug 29, 2012 at 11:16:59PM -0700, Matt Turner wrote:
> From: Tom Stellard <tstellar at gmail.com>
> 

I'm getting some build warnings when building the gallivm files:

In file included from
/usr/local/llvm/3.1/release/include/llvm/ExecutionEngine/JITEventListener.h:18:0,
                 from gallivm/lp_bld_misc.cpp:49:
/usr/local/llvm/3.1/release/include/llvm/Config/config.h:659:0: warning:
"PACKAGE_BUGREPORT" redefined [enabled by default]
<command-line>:0:0: note: this is the location of the previous
definition
/usr/local/llvm/3.1/release/include/llvm/Config/config.h:662:0: warning:
"PACKAGE_NAME" redefined [enabled by default]
<command-line>:0:0: note: this is the location of the previous
definition
/usr/local/llvm/3.1/release/include/llvm/Config/config.h:665:0: warning:
"PACKAGE_STRING" redefined [enabled by default]
<command-line>:0:0: note: this is the location of the previous
definition
/usr/local/llvm/3.1/release/include/llvm/Config/config.h:668:0: warning:
"PACKAGE_TARNAME" redefined [enabled by default]
<command-line>:0:0: note: this is the location of the previous
definition
/usr/local/llvm/3.1/release/include/llvm/Config/config.h:671:0: warning:
"PACKAGE_VERSION" redefined [enabled by default]
<command-line>:0:0: note: this is the location of the previous
definition

I think LLVM should be prefixing these defines with LLVM, since they are
in a public header that is part of the library, but I'm not sure the
best way to fix this in Mesa.

-Tom


> ---
>  configure.ac                      |    2 +
>  src/gallium/auxiliary/.gitignore  |    1 +
>  src/gallium/auxiliary/Makefile    |   42 ----------------------------------
>  src/gallium/auxiliary/Makefile.am |   45 +++++++++++++++++++++++++++++++++++++
>  4 files changed, 48 insertions(+), 42 deletions(-)
>  create mode 100644 src/gallium/auxiliary/.gitignore
>  delete mode 100644 src/gallium/auxiliary/Makefile
>  create mode 100644 src/gallium/auxiliary/Makefile.am
> 
> diff --git a/configure.ac b/configure.ac
> index 6bd0e4a..c34dc2c 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -1978,6 +1978,7 @@ AM_CONDITIONAL(USE_R600_LLVM_COMPILER, test x$USE_R600_LLVM_COMPILER = xyes)
>  AM_CONDITIONAL(HAVE_LOADER_GALLIUM, test x$enable_gallium_loader = xyes)
>  AM_CONDITIONAL(HAVE_DRM_LOADER_GALLIUM, test x$enable_gallium_drm_loader = xyes)
>  AM_CONDITIONAL(HAVE_GALLIUM_COMPUTE, test x$enable_opencl = xyes)
> +AM_CONDITIONAL(HAVE_MESA_LLVM, test x$MESA_LLVM = x1)
>  AC_SUBST([GALLIUM_MAKE_DIRS])
>  
>  AM_CONDITIONAL(HAVE_X11_DRIVER, echo "$DRIVER_DIRS" | grep 'x11' >/dev/null 2>&1)
> @@ -2015,6 +2016,7 @@ AC_CONFIG_FILES([configs/current
>  		src/egl/wayland/wayland-egl/Makefile
>  		src/egl/wayland/wayland-egl/wayland-egl.pc
>  		src/gallium/Makefile
> +		src/gallium/auxiliary/Makefile
>  		src/gallium/auxiliary/pipe-loader/Makefile
>  		src/gallium/drivers/Makefile
>  		src/gallium/drivers/r300/Makefile
> diff --git a/src/gallium/auxiliary/.gitignore b/src/gallium/auxiliary/.gitignore
> new file mode 100644
> index 0000000..f3c7a7c
> --- /dev/null
> +++ b/src/gallium/auxiliary/.gitignore
> @@ -0,0 +1 @@
> +Makefile
> diff --git a/src/gallium/auxiliary/Makefile b/src/gallium/auxiliary/Makefile
> deleted file mode 100644
> index 3ba3f9c..0000000
> --- a/src/gallium/auxiliary/Makefile
> +++ /dev/null
> @@ -1,42 +0,0 @@
> -TOP = ../../..
> -include $(TOP)/configs/current
> -
> -LIBNAME = gallium
> -
> -# get source lists
> -include Makefile.sources
> -
> -C_SOURCES += $(GENERATED_SOURCES)
> -
> -ifeq ($(MESA_LLVM),1)
> -C_SOURCES += \
> -	$(GALLIVM_SOURCES)
> -CPP_SOURCES += \
> -	$(GALLIVM_CPP_SOURCES)
> -endif
> -
> -
> -include ../Makefile.template
> -
> -default install clean: %: subdirs-%
> -
> -subdirs-%:
> -	@for dir in $(SUBDIRS) ; do \
> -		if [ -d $$dir ] ; then \
> -			(cd $$dir && $(MAKE) $*) || exit 1; \
> -		fi \
> -	done
> -
> -indices/u_indices_gen.c: indices/u_indices_gen.py
> -	$(PYTHON2) $< > $@
> -
> -indices/u_unfilled_gen.c: indices/u_unfilled_gen.py
> -	$(PYTHON2) $< > $@
> -
> -util/u_format_srgb.c: util/u_format_srgb.py
> -	$(PYTHON2) $< > $@
> -
> -util/u_format_table.c: util/u_format_table.py util/u_format_pack.py util/u_format_parse.py util/u_format.csv
> -	$(PYTHON2) util/u_format_table.py util/u_format.csv > $@
> -
> -# DO NOT DELETE
> diff --git a/src/gallium/auxiliary/Makefile.am b/src/gallium/auxiliary/Makefile.am
> new file mode 100644
> index 0000000..7096c11
> --- /dev/null
> +++ b/src/gallium/auxiliary/Makefile.am
> @@ -0,0 +1,45 @@
> +AUTOMAKE_OPTIONS = subdir-objects
> +
> +include Makefile.sources
> +include $(top_srcdir)/src/gallium/Automake.inc
> +
> +SUBDIRS += pipebuffer
> +noinst_LTLIBRARIES = libgallium.la
> +
> +AM_CFLAGS = \
> +	$(GALLIUM_CFLAGS)
> +
> +libgallium_la_SOURCES = \
> +	$(C_SOURCES) \
> +	$(GENERATED_SOURCES)
> +
> +if HAVE_MESA_LLVM
> +
> +AM_CFLAGS += \
> +	$(LLVM_CFLAGS)
> +
> +AM_CXXFLAGS = \
> +	$(GALLIUM_CFLAGS) \
> +	$(LLVM_CXXFLAGS)
> +
> +libgallium_la_SOURCES += \
> +	$(GALLIVM_SOURCES) \
> +	$(GALLIVM_CPP_SOURCES)
> +
> +endif
> +
> +indices/u_indices_gen.c: indices/u_indices_gen.py
> +	$(AM_V_GEN) $(PYTHON2) $< > $@
> +
> +indices/u_unfilled_gen.c: indices/u_unfilled_gen.py
> +	$(AM_V_GEN) $(PYTHON2) $< > $@
> +
> +util/u_format_srgb.c: util/u_format_srgb.py
> +	$(AM_V_GEN) $(PYTHON2) $< > $@
> +
> +util/u_format_table.c: util/u_format_table.py util/u_format_pack.py util/u_format_parse.py util/u_format.csv
> +	$(AM_V_GEN) $(PYTHON2) util/u_format_table.py util/u_format.csv > $@
> +
> +#XXX: Delete this when all targets are converted to automake.
> +all-local: libgallium.la
> +	ln -f $(builddir)/.libs/libgallium.a $(builddir)/libgallium.a
> -- 
> 1.7.8.6
> 
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list