[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
binutils-2.22/intl/configure does not set INCINTL in config.intl when --
From: |
Rene Sugar |
Subject: |
binutils-2.22/intl/configure does not set INCINTL in config.intl when --with-libintl-prefix specified |
Date: |
Wed, 15 Feb 2012 21:20:38 -0800 |
User-agent: |
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0.1) Gecko/20120208 Thunderbird/10.0.1 |
There is a configuration parameter to influence how INCINTL gets set in
config.intl.
--with-libintl-prefix[=DIR] search for libintl in DIR/include and
DIR/lib
However, the configured value for INCINTL is not written to config.intl
in binutils-2.22/intl/configure.
I am compiling on mingw-w64 on Windows 64-bit using libiconv and libintl
built from gettext-0.18.1.
Here is the configure command line to reproduce the behavior:
binutils-2.22
./configure --host=x86_64-w64-mingw32 --build=x86_64-w64-mingw32
--target=x86_64-w64-mingw32 --prefix=$(cd ../install && pwd)
--disable-shared --enable-static
--enable-targets=x86_64-w64-mingw32,i686-w64-mingw32 --enable-ld=yes
--enable-cloog-backend=isl --with-gmp=$(cd ../install && pwd)
--with-mpc=$(cd ../install && pwd) --with-mpfr=$(cd ../install && pwd)
--with-ppl=$(cd ../install && pwd) --with-cloog=$(cd ../install && pwd)
--with-libiconv-prefix=$(cd ../install && pwd)
--with-libintl-prefix=$(cd ../install && pwd)
binutils-2.22/intl
./configure --host=x86_64-w64-mingw32 --build=x86_64-w64-mingw32
--target=x86_64-w64-mingw32 --prefix=$(cd ../../install && pwd)
--with-libiconv-prefix=$(cd ../../install && pwd)
--with-libintl-prefix=$(cd ../../install && pwd)
The include library is found in $CPPFLAGS so INCINTL is not written to
config.intl. binutils-2.22/bfd then can't find libintl.h.
binutils-2.22/intl/configure
if test "X$additional_includedir" != "X"; then
if test "X$additional_includedir" != "X/usr/include"; then
haveit=
if test "X$additional_includedir" =
"X/usr/local/include"; then
if test -n "$GCC"; then
case $host_os in
linux*) haveit=yes;;
esac
fi
fi
if test -z "$haveit"; then
// Changed line 6021
- for x in $CPPFLAGS $INCINTL; do
// to
+ for x in $INCINTL; do
acl_save_prefix="$prefix"
prefix="$acl_final_prefix"
In the attached file, the other fixes to get binutils-2.22 to compile on
mingw-w64 are:
(1) Same fix as https://trac.macports.org/ticket/26537 applied to
binutils-2.22/gold/gold.h
+#ifdef setlocale
+// Someone in libintl world decided it was a good idea to define a
"setlocale" macro.
+#undef setlocale
+#endif
(2) http://sourceware.org/bugzilla/show_bug.cgi?id=13292
(3) binutils-2.22/configure checks for the exact version of cloog
0.16.x. I have 0.17.0. Is changing this test from "!= 16" to ">= 16" safe?
(4) binutils-2.22/gold/descriptors.cc - compiler warning about 'fd'
being an unused parameter treated as an error.
static inline void
set_close_on_exec(int fd)
{
// Mingw does not define F_SETFD.
#ifdef F_SETFD
fcntl(fd, F_SETFD, FD_CLOEXEC);
#else
(void)fd;
#endif
}
I'm also getting "narrowing conversion" warnings (treated as errors)
trying to compile binutils-2.22/gold using gcc 4.7.
I found this config file which looks like one way to get rid of the
warnings.
http://svn.openttd.org/trunk/config.lib
if [ $cc_version -ge 43 ]; then
# Use gnu++0x mode so static_assert() is available.
# Don't use c++0x, it breaks mingw (with gcc 4.4.0).
cxxflags="$cxxflags -std=gnu++0x"
fi
if [ $cc_version -ge 47 ]; then
# Disable -Wnarrowing which gives many warnings, such as:
# warning: narrowing conversion of '...' from 'unsigned
int' to 'int' inside { } [-Wnarrowing]
# They are valid according to the C++ standard, but useless.
cxxflags="$cxxflags -Wno-narrowing"
# Disable bogus 'attempt to free a non-heap object' warning
flags="$flags -Wno-free-nonheap-object"
fi
x86_64-w64-mingw32-g++ -DHAVE_CONFIG_H -I. -I. -I./../include
-I./../elfcpp -DLOCALEDIR="\"/c/work/
sources/install/share/locale\""
-DBINDIR="\"/c/work/sources/install/bin\"" -DTOOLBINDIR="\"/c/work/s
ources/install/x86_64-w64-mingw32/bin\""
-I/c/work/sources/install/include -W -Wall -Wno-format
-Werror -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
-frandom-seed=dwarf_reader.o -g -O2 -MT dwarf_rea
der.o -MD -MP -MF .deps/dwarf_reader.Tpo -c -o dwarf_reader.o
dwarf_reader.cc
dwarf_reader.cc: In instantiation of 'const unsigned char*
gold::Sized_dwarf_line_info<size, big_end
ian>::read_lines(const unsigned char*, unsigned int) [with int size =
32; bool big_endian = false]':
dwarf_reader.cc:925:7: required from here
dwarf_reader.cc:495:56: error: narrowing conversion of
'lsm.gold::LineStateMachine::address' from 'u
int64_t {aka long long unsigned int}' to 'off_t {aka long long int}'
inside { } is ill-formed in C++
11 [-Werror=narrowing]
dwarf_reader.cc:495:56: error: narrowing conversion of
'lsm.gold::LineStateMachine::file_num' from '
int' to 'unsigned int' inside { } is ill-formed in C++11 [-Werror=narrowing]
dwarf_reader.cc: In instantiation of 'const unsigned char*
gold::Sized_dwarf_line_info<size, big_end
ian>::read_lines(const unsigned char*, unsigned int) [with int size =
32; bool big_endian = true]':
dwarf_reader.cc:930:7: required from here
dwarf_reader.cc:495:56: error: narrowing conversion of
'lsm.gold::LineStateMachine::address' from 'u
int64_t {aka long long unsigned int}' to 'off_t {aka long long int}'
inside { } is ill-formed in C++
11 [-Werror=narrowing]
dwarf_reader.cc:495:56: error: narrowing conversion of
'lsm.gold::LineStateMachine::file_num' from '
int' to 'unsigned int' inside { } is ill-formed in C++11 [-Werror=narrowing]
dwarf_reader.cc: In instantiation of 'const unsigned char*
gold::Sized_dwarf_line_info<size, big_end
ian>::read_lines(const unsigned char*, unsigned int) [with int size =
64; bool big_endian = false]':
dwarf_reader.cc:935:7: required from here
dwarf_reader.cc:495:56: error: narrowing conversion of
'lsm.gold::LineStateMachine::address' from 'u
int64_t {aka long long unsigned int}' to 'off_t {aka long long int}'
inside { } is ill-formed in C++
11 [-Werror=narrowing]
dwarf_reader.cc:495:56: error: narrowing conversion of
'lsm.gold::LineStateMachine::file_num' from '
int' to 'unsigned int' inside { } is ill-formed in C++11 [-Werror=narrowing]
dwarf_reader.cc: In instantiation of 'const unsigned char*
gold::Sized_dwarf_line_info<size, big_end
ian>::read_lines(const unsigned char*, unsigned int) [with int size =
64; bool big_endian = true]':
dwarf_reader.cc:940:7: required from here
dwarf_reader.cc:495:56: error: narrowing conversion of
'lsm.gold::LineStateMachine::address' from 'u
int64_t {aka long long unsigned int}' to 'off_t {aka long long int}'
inside { } is ill-formed in C++
11 [-Werror=narrowing]
dwarf_reader.cc:495:56: error: narrowing conversion of
'lsm.gold::LineStateMachine::file_num' from '
int' to 'unsigned int' inside { } is ill-formed in C++11 [-Werror=narrowing]
cc1plus.exe: all warnings being treated as errors
binutils-2.22.patch
Description: Text Data
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- binutils-2.22/intl/configure does not set INCINTL in config.intl when --with-libintl-prefix specified,
Rene Sugar <=