correct cflags/libs for system libvpx

RESOLVED FIXED in mozilla17

Status

()

Core
Build Config
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: bugmenot, Unassigned)

Tracking

Trunk
mozilla17
x86_64
FreeBSD
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Reporter)

Description

5 years ago
Created attachment 645589 [details] [diff] [review]
actually use flags from pkg-config

User Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/17.0 Firefox/17.0
Build ID: 20120725002704

Steps to reproduce:

pkg-config-0.26

./configure --with-system-libvpx



Actual results:

1. MOZ_LIBVPX_INCLUDES and MOZ_LIBVPX_LIBS are never populated
2. -lvpx is propagated to OS_LIBS and so not only libxul.so but firefox (app binary) ends up being linked against -lvpx (which it doesn't use)



Expected results:

1. MOZ_LIBVPX_(INCLUDES|LIBS) should get CFLAGS from pkg-config
2. CFLAGS/LIBS should be restored after PKG_CHECK_MODULES
(Reporter)

Updated

5 years ago
Attachment #645589 - Attachment is patch: true
Attachment #645589 - Flags: review?(khuey)
Attachment #645589 - Flags: feedback?(stransky)
Comment on attachment 645589 [details] [diff] [review]
actually use flags from pkg-config

I'm going to delegate this review to derf.
Attachment #645589 - Flags: review?(khuey) → review?(tterribe)
Comment on attachment 645589 [details] [diff] [review]
actually use flags from pkg-config

>+_SAVE_CFLAGS=$CFLAGS
>+_SAVE_LDFLAGS=$LDFLAGS
>+_SAVE_LIBS=$LIBS

...

>+CFLAGS=$_SAVE_CFLAGS
>+LDFLAGS=$_SAVE_LDFLAGS
>+LIBS=$_SAVE_LIBS

Can you explain to me what this is needed for? There are dozens of places we use the macros contained in this construct without these guards.
(Reporter)

Comment 3

5 years ago
Created attachment 645864 [details] [diff] [review]
Normalize VPX pkg-config variable and restore LIBS after the check

After adding a few printf's I've tracked spurious -lvpx to AC_CHECK_LIB. So, you're right, those guards are unnecessary, except LIBS.
Attachment #645589 - Attachment is obsolete: true
Attachment #645589 - Flags: review?(tterribe)
Attachment #645589 - Flags: feedback?(stransky)
Attachment #645864 - Flags: review?(tterribe)
Attachment #645864 - Flags: review?(tterribe) → review+
(Reporter)

Updated

5 years ago
Attachment #645864 - Flags: checkin?(tterribe)
Comment on attachment 645864 [details] [diff] [review]
Normalize VPX pkg-config variable and restore LIBS after the check

Greenish on try: https://tbpl.mozilla.org/?tree=Try&rev=3663e5f77560

https://hg.mozilla.org/integration/mozilla-inbound/rev/c4fa4a471932

bugmenot: Just a note for next time, if you could follow the guidelines in http://blog.bonardo.net/2010/06/22/so-youre-about-to-use-checkin-needed for the commit message, that would be super-helpful. Less thinking for me.
Attachment #645864 - Flags: checkin?(tterribe) → checkin+
https://hg.mozilla.org/mozilla-central/rev/c4fa4a471932
Status: UNCONFIRMED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla17
You need to log in before you can comment on or make changes to this bug.