[Poppler-bugs] [Bug 76963] I can't build poppler with Clang

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Sat Nov 1 22:39:33 PDT 2014


https://bugs.freedesktop.org/show_bug.cgi?id=76963

--- Comment #6 from Daniel Macks <dmacks at netspace.org> ---
The following seems to work:

AC_MSG_CHECKING([for -fno-check-new compiler flag])
AC_LANG_PUSH([C++])
saved_CXXFLAGS=$CXXFLAGS
CXXFLAGS="-fno-check-new $CXXFLAGS"
AC_TRY_COMPILE([], [],
  AC_MSG_RESULT([yes]),
  AC_MSG_RESULT([no])
)
CXXFLAGS=$saved_CXXFLAGS
AC_LANG_POP

I'll be happy to provide a patch against current git, but there are two
approaches. Reason I ask is that the flag is only *sometimes* added, via
various branches of a case statement beginning at line 814.

1. Do this test (always) and store the result in a temp variable, and then use
that result to control whether the flag is propagated in the branches where it
was previously hardcoded to add.
2. Do this test and propagate the flag only in the branches where it is
currently hardcoded to use.

The tradeoff is that option 1 avoids duplicating the test code itself (less
fragile if the case logic changes) but means the test is run even in situations
where its results would be ignored. Please let me know which approach you would
prefer (or some other approach altogether).

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/poppler-bugs/attachments/20141102/b58c2b8b/attachment.html>


More information about the Poppler-bugs mailing list