[FFmpeg-devel] [PATCH]Set isysroot instead of sysroot on darwin
Michael Niedermayer
michaelni at gmx.at
Wed Mar 19 14:18:01 CET 2014
On Wed, Mar 19, 2014 at 03:06:16AM +0100, Carl Eugen Hoyos wrote:
> On Tuesday 18 March 2014 08:28:28 am Reimar Döffinger wrote:
> > On 18.03.2014, at 02:27, Michael Niedermayer <michaelni at gmx.at> wrote:
> > > On Sun, Mar 16, 2014 at 03:08:04PM +0100, Carl Eugen Hoyos wrote:
> > >> Hi!
> > >>
> > >> Newer versions of clang on Mac OSX ignore (?) --sysroot, it at least
> > >> doesn't work as expected from how gcc works. isysroot (alone!)
> > >> works, this page implies that this is expected behaviour on darwin:
> > >> http://gcc.gnu.org/ml/gcc-patches/2010-09/msg00292.html
> > >> Attached patch fixes the issues I see on 10.9.
> > >>
> > >> See also http://git.videolan.org/?p=ffmpeg.git;a=commitdiff;h=00ba041c
> > >>
> > >> Please comment, Carl Eugen
> > >>
> > >> configure | 5 +++++
> > >> 1 file changed, 5 insertions(+)
> > >> 89d45054153011c6f9ec006f059b61d92a49736d patchisysrootdarwin.diff
> > >> diff --git a/configure b/configure
> > >> index 34200a3..c633364 100755
> > >> --- a/configure
> > >> +++ b/configure
> > >> @@ -3391,8 +3391,13 @@ add_asflags $extra_cflags
> > >> if test -n "$sysroot"; then
> > >> case "$cc_type" in
> > >> gcc|llvm_gcc|clang)
> > >> + if test "$target_os" = darwin; then
> > >> + add_cppflags -isysroot "$sysroot"
> > >> + add_ldflags -isysroot "$sysroot"
> > >> + else
> > >> add_cppflags --sysroot="$sysroot"
> > >> add_ldflags --sysroot="$sysroot"
> > >> + fi
> > >
> > > i cant really comment on this
> > > but if it doesnt work without this then its probably a good idea
> > > to apply
> >
> > I still think that since having an extra -isysroot doesn't change anything
> > it would be better to avoid the if and just always use
> >
> > >> --sysroot="$sysroot" -isysroot "$sysroot"
> >
> > Either way, some extra comments would be good, especially since if I
> > remember right it is only a workaround for clang specifically.
>
> New patch attached.
>
> Thank you, Carl Eugen
> configure | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
> fa64796d091325ed1aaf93ff1ccda3048a8134e8 patchisysrootdarwin2.diff
> diff --git a/configure b/configure
> index b41e0dc..0390088 100755
> --- a/configure
> +++ b/configure
> @@ -3395,8 +3395,9 @@ add_asflags $extra_cflags
> if test -n "$sysroot"; then
> case "$cc_type" in
> gcc|llvm_gcc|clang)
> - add_cppflags --sysroot="$sysroot"
> - add_ldflags --sysroot="$sysroot"
> +# On Darwin --sysroot may be ignored, -isysroot always affects headers and linking
> + add_cppflags --sysroot="$sysroot" -isysroot "$sysroot"
> + add_ldflags --sysroot="$sysroot" -isysroot "$sysroot"
should be ok
i was thinking that maybe these should be added with seperate add_*
commands for the case that some tools dont understand one kine
but i dont know if such tools exist
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
I have often repented speaking, but never of holding my tongue.
-- Xenocrates
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20140319/1fd5c749/attachment.asc>
More information about the ffmpeg-devel
mailing list