On Tue, 28 May 2013, Luca Barbato wrote:
On 5/28/13 2:40 PM, Martin Storsjö wrote:
On Tue, 28 May 2013, Luca Barbato wrote:
On 5/28/13 2:28 PM, Martin Storsjö wrote:
This reverts e08c946c6 and 05165c2f7a. The actual intention of
e08c946c6 was to fix shared library builds for arm/win32, which
can also be accomplished in other ways.
Disabling pic on those platforms broke inline assembly on cygwin/64
(since some inline assembly requires knowing whether we are building
as PIC or not), and might also break inline assembly on other
compilers on windows.
As a side-effect, this unfortunately brings back all the warnings
about PIC not having any effect on that platform.
(The alternative would be to try to separate cases where the compiler
has enabled PIC implicitly (and has defined __PIC__) or we have
enabled it manually ourselves and apply the inline assembly
workarounds for both cases, but that would probably complicate things
quite a bit.)
What about disabling pic but appending -DPIC on windows?
Well, I guess you could check the target os in enable_weak_pic. Kinda
ugly though but it might work.
That or just append the define in the os selection next to disable pic, or it
wouldn't work?
That would work, but that makes even more assumptions. Ideally, the
current logic that checks for __pic__ and __PIC__ should be kept and only
add -DPIC in that case. But just not add -fPIC (which adds the warnings).
// Martin
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel