[Mesa-dev] [PATCH v2 6/8] Haiku: add src/gallium/targets/haiku-softpipe/Makefile.am

Emil Velikov emil.l.velikov at gmail.com
Thu Oct 26 13:42:57 UTC 2017


On 24 October 2017 at 17:11, Jerome Duval <jerome.duval at gmail.com> wrote:

> +libswpipe_la_SOURCES = \
> +               GalliumContext.cpp \
> +               SoftwareRenderer.cpp
> +
Please enhance this and move to Makefile.sources. Bonus points for
reusing it in SConscript (at a later stage)

GalliumContext.cpp
GalliumContext.h
SoftwareRenderer.cpp
SoftwareRenderer.h



> +libswpipe_la_LDFLAGS = \
> +               -shared \
> +               -shrext .so \
> +               -module \
Add the following
        -no-undefined \
> +               -avoid-version \
> +               $(GC_SECTIONS)
> +
       $(LD_NO_UNDEFINED)

It will make the linker error out, if any of the required libraries
are missing ;-)


> +libswpipe_la_LIBADD = \
> +               $(top_builddir)/src/hgl/libGL.la \
I think, this is not needed - not 100% sure.

> +               -lnetwork
-lnetwork seems "new" - please add a note about it.


> +TARGET_DRIVERS =
> +TARGET_CPPFLAGS =
> +TARGET_LIB_DEPS =
> +
> +include $(top_srcdir)/src/gallium/drivers/softpipe/Automake.inc
> +include $(top_srcdir)/src/gallium/drivers/llvmpipe/Automake.inc
> +include $(top_srcdir)/src/gallium/drivers/swr/Automake.inc
> +
> +
Drop this hunk.

> +if HAVE_GALLIUM_LLVM
> +AM_CPPFLAGS += -DGALLIUM_LLVMPIPE
> +
> +libswpipe_la_LIBADD += $(LLVM_LIBS) \
> +       $(top_builddir)/src/gallium/drivers/llvmpipe/libllvmpipe.la
LLVM_LIBS should be after the .la.

> +libswpipe_la_LDFLAGS += $(LLVM_LDFLAGS)
> +endif
> +
> +if HAVE_GALLIUM_SWR
> +AM_CPPFLAGS += -DGALLIUM_SWR
> +
> +libswpipe_la_LIBADD += \
> +        $(top_builddir)/src/gallium/drivers/swr/libmesaswr.la
Missing LLVM_LDFLAGS/LLVM_LIBS ?

> +endif

> diff --git a/src/gallium/targets/haiku-softpipe/SoftwareRenderer.cpp b/src/gallium/targets/haiku-softpipe/SoftwareRenderer.cpp
> index 18cb1ac..4e4888a 100644
> --- a/src/gallium/targets/haiku-softpipe/SoftwareRenderer.cpp
> +++ b/src/gallium/targets/haiku-softpipe/SoftwareRenderer.cpp
> @@ -33,6 +33,8 @@
>
>  extern const char* color_space_name(color_space space);
>
> +#undef _EXPORT
> +#define _EXPORT __attribute__((__visibility__("default")))
>
Unrelated change - worth keeping separate.
It seems like a hack/workaround, that you'd want documented. This way
you/others will have a quick reference X months from now.

Thanks
Emil


More information about the mesa-dev mailing list