Re: [RFC PATCH:xf86-video-ati 9/15] Link with modules needed to build with no-undefined linking
On 06/14/12 06:27 AM, Gaetan Nadon wrote: > On 12-06-13 06:31 PM, Alan Coopersmith wrote: >> On 06/12/12 12:06 AM, Michel Dänzer wrote: >>> On Mon, 2012-06-11 at 18:36 -0700, Alan Coopersmith wrote: On 06/ 1/12 02:56 AM, Michel Dänzer wrote: > On Fre, 2012-05-25 at 08:02 -0700, Alan Coopersmith wrote: >> Signed-off-by: Alan Coopersmith >> --- >> src/Makefile.am | 13 +++-- >> 1 file changed, 11 insertions(+), 2 deletions(-) >> >> diff --git a/src/Makefile.am b/src/Makefile.am >> index dc77c02..4357135 100644 >> --- a/src/Makefile.am >> +++ b/src/Makefile.am >> @@ -26,11 +26,12 @@ >> # _ladir passes a dummy rpath to libtool so the thing will actually link >> # TODO: -nostdlib/-Bstatic/-lgcc platform magic, not installing the .a, >> etc. >> >> -radeon_drv_la_LIBADD = $(LIBDRM_RADEON_LIBS) >> +radeon_drv_la_LIBADD = $(LIBDRM_RADEON_LIBS) $(XORG_LIBS) -lpixman-1 -lm > The driver doesn't depend on pixman directly, does it? I'd prefer that > to be inherited from xserver somehow. If it isn't covered by -lfb > anyway, that is. It does, thanks to the fb macros that now implement region operations using pixman functions - nm on radeon_drv.so here shows it calling: pixman_region_copy pixman_region_equal pixman_region_subtract pixman_region_union >>> Ugh. I stand by my point though: This is an xserver implementation >>> detail, so ideally the -lpixman-1 should be inherited from xserver. >>> >>> Maybe that's beyond the scope of this patch, but at the least the pixman >>> link stanza needs to be determined via pkg-config. >> Unfortunately, the X server pkg-config file doesn't know which modules are >> going to call the region functions or not - I suppose we could add it to the >> .pc file and have libpixman linked into every module, whether it uses it or >> not. >> >> But certainly I can replace -lpixman-1 in Makefile.am with a >> PKG_CHECK_MODULES(..., pixman-1) in configure.ac. I don't remember why I >> didn't do that in the first place. >> > I am out of context here, didn't read the whole thread. Isn't there a > -lpixman-1 > already provided by the server? > > PKG_CHECK_MODULES(XORG, [xorg-server >= 1.3 xproto fontsproto > $REQUIRED_MODULES]) > > Which leads to: > > XORG_LIBS = -L/home/nadon/xorg/src/inst/lib -lpixman-1 -lpciaccess That's in xorg-server though, not exported to driver/xf86-video-ati. -- -Alan Coopersmith- alan.coopersm...@oracle.com Oracle Solaris Engineering - http://blogs.oracle.com/alanc ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [RFC PATCH:xf86-video-ati 9/15] Link with modules needed to build with no-undefined linking
On 12-06-13 06:31 PM, Alan Coopersmith wrote: > On 06/12/12 12:06 AM, Michel Dänzer wrote: >> On Mon, 2012-06-11 at 18:36 -0700, Alan Coopersmith wrote: >>> On 06/ 1/12 02:56 AM, Michel Dänzer wrote: On Fre, 2012-05-25 at 08:02 -0700, Alan Coopersmith wrote: > Signed-off-by: Alan Coopersmith > --- > src/Makefile.am | 13 +++-- > 1 file changed, 11 insertions(+), 2 deletions(-) > > diff --git a/src/Makefile.am b/src/Makefile.am > index dc77c02..4357135 100644 > --- a/src/Makefile.am > +++ b/src/Makefile.am > @@ -26,11 +26,12 @@ > # _ladir passes a dummy rpath to libtool so the thing will actually link > # TODO: -nostdlib/-Bstatic/-lgcc platform magic, not installing the .a, > etc. > > -radeon_drv_la_LIBADD = $(LIBDRM_RADEON_LIBS) > +radeon_drv_la_LIBADD = $(LIBDRM_RADEON_LIBS) $(XORG_LIBS) -lpixman-1 -lm The driver doesn't depend on pixman directly, does it? I'd prefer that to be inherited from xserver somehow. If it isn't covered by -lfb anyway, that is. >>> It does, thanks to the fb macros that now implement region operations using >>> pixman functions - nm on radeon_drv.so here shows it calling: >>> >>> pixman_region_copy >>> pixman_region_equal >>> pixman_region_subtract >>> pixman_region_union >> Ugh. I stand by my point though: This is an xserver implementation >> detail, so ideally the -lpixman-1 should be inherited from xserver. >> >> Maybe that's beyond the scope of this patch, but at the least the pixman >> link stanza needs to be determined via pkg-config. > Unfortunately, the X server pkg-config file doesn't know which modules are > going to call the region functions or not - I suppose we could add it to the > .pc file and have libpixman linked into every module, whether it uses it or > not. > > But certainly I can replace -lpixman-1 in Makefile.am with a > PKG_CHECK_MODULES(..., pixman-1) in configure.ac. I don't remember why I > didn't do that in the first place. > I am out of context here, didn't read the whole thread. Isn't there a -lpixman-1 already provided by the server? PKG_CHECK_MODULES(XORG, [xorg-server >= 1.3 xproto fontsproto $REQUIRED_MODULES]) Which leads to: XORG_LIBS = -L/home/nadon/xorg/src/inst/lib -lpixman-1 -lpciaccess ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [RFC PATCH:xf86-video-ati 9/15] Link with modules needed to build with no-undefined linking
On Mit, 2012-06-13 at 15:31 -0700, Alan Coopersmith wrote: > On 06/12/12 12:06 AM, Michel Dänzer wrote: > > On Mon, 2012-06-11 at 18:36 -0700, Alan Coopersmith wrote: > >> On 06/ 1/12 02:56 AM, Michel Dänzer wrote: > >>> On Fre, 2012-05-25 at 08:02 -0700, Alan Coopersmith wrote: > Signed-off-by: Alan Coopersmith > --- > src/Makefile.am | 13 +++-- > 1 file changed, 11 insertions(+), 2 deletions(-) > > diff --git a/src/Makefile.am b/src/Makefile.am > index dc77c02..4357135 100644 > --- a/src/Makefile.am > +++ b/src/Makefile.am > @@ -26,11 +26,12 @@ > # _ladir passes a dummy rpath to libtool so the thing will actually link > # TODO: -nostdlib/-Bstatic/-lgcc platform magic, not installing the .a, > etc. > > -radeon_drv_la_LIBADD = $(LIBDRM_RADEON_LIBS) > +radeon_drv_la_LIBADD = $(LIBDRM_RADEON_LIBS) $(XORG_LIBS) -lpixman-1 -lm > >>> > >>> The driver doesn't depend on pixman directly, does it? I'd prefer that > >>> to be inherited from xserver somehow. If it isn't covered by -lfb > >>> anyway, that is. > >> > >> It does, thanks to the fb macros that now implement region operations using > >> pixman functions - nm on radeon_drv.so here shows it calling: > >> > >> pixman_region_copy > >> pixman_region_equal > >> pixman_region_subtract > >> pixman_region_union > > > > Ugh. I stand by my point though: This is an xserver implementation > > detail, so ideally the -lpixman-1 should be inherited from xserver. > > > > Maybe that's beyond the scope of this patch, but at the least the pixman > > link stanza needs to be determined via pkg-config. > > Unfortunately, the X server pkg-config file doesn't know which modules are > going to call the region functions or not - I suppose we could add it to the > .pc file and have libpixman linked into every module, whether it uses it or > not. That's not ideal either, e.g. Debian package builds warn about linking to libraries without referencing any of their symbols. OTOH that's probably the case even with this patch with xserver 1.8 or older. So maybe that would still be a better solution than forcing drivers to deal with this... -- Earthling Michel Dänzer | http://www.amd.com Libre software enthusiast | Debian, X and DRI developer ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [RFC PATCH:xf86-video-ati 9/15] Link with modules needed to build with no-undefined linking
On 06/12/12 12:06 AM, Michel Dänzer wrote: > On Mon, 2012-06-11 at 18:36 -0700, Alan Coopersmith wrote: >> On 06/ 1/12 02:56 AM, Michel Dänzer wrote: >>> On Fre, 2012-05-25 at 08:02 -0700, Alan Coopersmith wrote: Signed-off-by: Alan Coopersmith --- src/Makefile.am | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/Makefile.am b/src/Makefile.am index dc77c02..4357135 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -26,11 +26,12 @@ # _ladir passes a dummy rpath to libtool so the thing will actually link # TODO: -nostdlib/-Bstatic/-lgcc platform magic, not installing the .a, etc. -radeon_drv_la_LIBADD = $(LIBDRM_RADEON_LIBS) +radeon_drv_la_LIBADD = $(LIBDRM_RADEON_LIBS) $(XORG_LIBS) -lpixman-1 -lm >>> >>> The driver doesn't depend on pixman directly, does it? I'd prefer that >>> to be inherited from xserver somehow. If it isn't covered by -lfb >>> anyway, that is. >> >> It does, thanks to the fb macros that now implement region operations using >> pixman functions - nm on radeon_drv.so here shows it calling: >> >> pixman_region_copy >> pixman_region_equal >> pixman_region_subtract >> pixman_region_union > > Ugh. I stand by my point though: This is an xserver implementation > detail, so ideally the -lpixman-1 should be inherited from xserver. > > Maybe that's beyond the scope of this patch, but at the least the pixman > link stanza needs to be determined via pkg-config. Unfortunately, the X server pkg-config file doesn't know which modules are going to call the region functions or not - I suppose we could add it to the .pc file and have libpixman linked into every module, whether it uses it or not. But certainly I can replace -lpixman-1 in Makefile.am with a PKG_CHECK_MODULES(..., pixman-1) in configure.ac. I don't remember why I didn't do that in the first place. -- -Alan Coopersmith- alan.coopersm...@oracle.com Oracle Solaris Engineering - http://blogs.oracle.com/alanc ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [RFC PATCH:xf86-video-ati 9/15] Link with modules needed to build with no-undefined linking
On Mon, 2012-06-11 at 18:36 -0700, Alan Coopersmith wrote: > On 06/ 1/12 02:56 AM, Michel Dänzer wrote: > > On Fre, 2012-05-25 at 08:02 -0700, Alan Coopersmith wrote: > >> Signed-off-by: Alan Coopersmith > >> --- > >> src/Makefile.am | 13 +++-- > >> 1 file changed, 11 insertions(+), 2 deletions(-) > >> > >> diff --git a/src/Makefile.am b/src/Makefile.am > >> index dc77c02..4357135 100644 > >> --- a/src/Makefile.am > >> +++ b/src/Makefile.am > >> @@ -26,11 +26,12 @@ > >> # _ladir passes a dummy rpath to libtool so the thing will actually link > >> # TODO: -nostdlib/-Bstatic/-lgcc platform magic, not installing the .a, > >> etc. > >> > >> -radeon_drv_la_LIBADD = $(LIBDRM_RADEON_LIBS) > >> +radeon_drv_la_LIBADD = $(LIBDRM_RADEON_LIBS) $(XORG_LIBS) -lpixman-1 -lm > > > > The driver doesn't depend on pixman directly, does it? I'd prefer that > > to be inherited from xserver somehow. If it isn't covered by -lfb > > anyway, that is. > > It does, thanks to the fb macros that now implement region operations using > pixman functions - nm on radeon_drv.so here shows it calling: > > pixman_region_copy > pixman_region_equal > pixman_region_subtract > pixman_region_union Ugh. I stand by my point though: This is an xserver implementation detail, so ideally the -lpixman-1 should be inherited from xserver. Maybe that's beyond the scope of this patch, but at the least the pixman link stanza needs to be determined via pkg-config. -- Earthling Michel Dänzer | http://www.amd.com Libre software enthusiast | Debian, X and DRI developer ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [RFC PATCH:xf86-video-ati 9/15] Link with modules needed to build with no-undefined linking
On 06/ 1/12 02:56 AM, Michel Dänzer wrote: > On Fre, 2012-05-25 at 08:02 -0700, Alan Coopersmith wrote: >> Signed-off-by: Alan Coopersmith >> --- >> src/Makefile.am | 13 +++-- >> 1 file changed, 11 insertions(+), 2 deletions(-) >> >> diff --git a/src/Makefile.am b/src/Makefile.am >> index dc77c02..4357135 100644 >> --- a/src/Makefile.am >> +++ b/src/Makefile.am >> @@ -26,11 +26,12 @@ >> # _ladir passes a dummy rpath to libtool so the thing will actually link >> # TODO: -nostdlib/-Bstatic/-lgcc platform magic, not installing the .a, etc. >> >> -radeon_drv_la_LIBADD = $(LIBDRM_RADEON_LIBS) >> +radeon_drv_la_LIBADD = $(LIBDRM_RADEON_LIBS) $(XORG_LIBS) -lpixman-1 -lm > > The driver doesn't depend on pixman directly, does it? I'd prefer that > to be inherited from xserver somehow. If it isn't covered by -lfb > anyway, that is. It does, thanks to the fb macros that now implement region operations using pixman functions - nm on radeon_drv.so here shows it calling: pixman_region_copy pixman_region_equal pixman_region_subtract pixman_region_union -- -Alan Coopersmith- alan.coopersm...@oracle.com Oracle Solaris Engineering - http://blogs.oracle.com/alanc ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [RFC PATCH:xf86-video-ati 9/15] Link with modules needed to build with no-undefined linking
On Fre, 2012-05-25 at 08:02 -0700, Alan Coopersmith wrote: > Signed-off-by: Alan Coopersmith > --- > src/Makefile.am | 13 +++-- > 1 file changed, 11 insertions(+), 2 deletions(-) > > diff --git a/src/Makefile.am b/src/Makefile.am > index dc77c02..4357135 100644 > --- a/src/Makefile.am > +++ b/src/Makefile.am > @@ -26,11 +26,12 @@ > # _ladir passes a dummy rpath to libtool so the thing will actually link > # TODO: -nostdlib/-Bstatic/-lgcc platform magic, not installing the .a, etc. > > -radeon_drv_la_LIBADD = $(LIBDRM_RADEON_LIBS) > +radeon_drv_la_LIBADD = $(LIBDRM_RADEON_LIBS) $(XORG_LIBS) -lpixman-1 -lm The driver doesn't depend on pixman directly, does it? I'd prefer that to be inherited from xserver somehow. If it isn't covered by -lfb anyway, that is. -- Earthling Michel Dänzer | http://www.amd.com Libre software enthusiast | Debian, X and DRI developer ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
[RFC PATCH:xf86-video-ati 9/15] Link with modules needed to build with no-undefined linking
Signed-off-by: Alan Coopersmith --- src/Makefile.am | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/Makefile.am b/src/Makefile.am index dc77c02..4357135 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -26,11 +26,12 @@ # _ladir passes a dummy rpath to libtool so the thing will actually link # TODO: -nostdlib/-Bstatic/-lgcc platform magic, not installing the .a, etc. -radeon_drv_la_LIBADD = $(LIBDRM_RADEON_LIBS) +radeon_drv_la_LIBADD = $(LIBDRM_RADEON_LIBS) $(XORG_LIBS) -lpixman-1 -lm +radeon_drv_la_LIBADD += -L$(moduledir) -lfb -lshadow -lxaa -lvgahw -lvbe -lint10 if DRI RADEON_DRI_SRCS = radeon_dri.c -radeon_drv_la_LIBADD += $(DRI_LIBS) +radeon_drv_la_LIBADD += $(DRI_LIBS) -L$(moduledir)/extensions -ldri -lglx endif RADEON_ATOMBIOS_SOURCES = \ @@ -50,11 +51,13 @@ RADEON_ATOMBIOS_SOURCES = \ if XF86DRM_MODE RADEON_KMS_SRCS=radeon_dri2.c radeon_kms.c drmmode_display.c radeon_vbo.c +radeon_drv_la_LIBADD += -L$(moduledir)/extensions -ldri2 endif if USE_EXA RADEON_EXA_SOURCES = radeon_exa.c r600_exa.c r6xx_accel.c r600_textured_videofuncs.c r600_shader.c radeon_exa_shared.c \ evergreen_exa.c evergreen_accel.c evergreen_shader.c evergreen_textured_videofuncs.c cayman_accel.c cayman_shader.c +radeon_drv_la_LIBADD += -lexa endif AM_CFLAGS = \ @@ -87,6 +90,12 @@ ati_drv_la_SOURCES = \ radeon_drv_la_LTLIBRARIES = radeon_drv.la radeon_drv_la_LDFLAGS = -module -avoid-version +radeon_drv_la_LDFLAGS += -Wl,$(moduledir)/multimedia/fi1236_drv.so +radeon_drv_la_LDFLAGS += -Wl,$(moduledir)/multimedia/msp3430_drv.so +radeon_drv_la_LDFLAGS += -Wl,$(moduledir)/multimedia/tda9885_drv.so +radeon_drv_la_LDFLAGS += -Wl,$(moduledir)/multimedia/uda1380_drv.so +radeon_drv_la_LIBADD += theatre_detect_drv.la +radeon_drv_la_LIBADD += theatre_drv.la radeon_drv_ladir = @moduledir@/drivers radeon_drv_la_SOURCES = \ radeon_accel.c radeon_cursor.c radeon_legacy_memory.c \ -- 1.7.9.2 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel