[MacPorts] #40478: gcc-4.8 (and likely earlier) build incorrectly +universal

MacPorts noreply at macports.org
Sat Sep 14 07:35:28 PDT 2013


#40478: gcc-4.8 (and likely earlier) build incorrectly +universal
-------------------------------+-------------------
 Reporter:  jeremyhu@…         |      Owner:  mww@…
     Type:  defect             |     Status:  new
 Priority:  Normal             |  Milestone:
Component:  ports              |    Version:  2.2.0
 Keywords:  universal leopard  |       Port:  gcc48
-------------------------------+-------------------
 I noticed this when trying to build libgcc on a Leopard VM:
 {{{
 /usr/bin/g++-4.2 -arch i386 -c   -g -DIN_GCC   -fno-exceptions -fno-rtti
 -fasynchronous-unwind-tables -W -Wall -Wwrite-strings -Wcast-qual
 -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros
 -Wno-overlength-strings -fno-common  -DHAVE_CONFIG_H -I. -I.
 -I/opt/local/var/macports/build/_Users_jeremy_src_macports_trunk_dports_lang_gcc48/libgcc/work/gcc-4.8.1/gcc
 -I/opt/local/var/macports/build/_Users_jeremy_src_macports_trunk_dports_lang_gcc48/libgcc/work/gcc-4.8.1/gcc/.
 -I/opt/local/var/macports/build/_Users_jeremy_src_macports_trunk_dports_lang_gcc48/libgcc/work/gcc-4.8.1/gcc/../include
 -I/opt/local/var/macports/build/_Users_jeremy_src_macports_trunk_dports_lang_gcc48/libgcc/work/gcc-4.8.1/gcc/../libcpp/include
 -I/opt/local/include -I/opt/local/include -I/opt/local/include
 -I/opt/local/var/macports/build/_Users_jeremy_src_macports_trunk_dports_lang_gcc48/libgcc/work/gcc-4.8.1/gcc/../libdecnumber
 -I/opt/local/var/macports/build/_Users_jeremy_src_macports_trunk_dports_lang_gcc48/libgcc/work/gcc-4.8.1/gcc/../libdecnumber/dpd
 -I../libdecnumber
 -I/opt/local/var/macports/build/_Users_jeremy_src_macports_trunk_dports_lang_gcc48/libgcc/work/gcc-4.8.1/gcc/../libbacktrace
 -I/opt/local/include
 /opt/local/var/macports/build/_Users_jeremy_src_macports_trunk_dports_lang_gcc48/libgcc/work/gcc-4.8.1/gcc
 /pointer-set.c -o pointer-set.o
 /opt/local/var/macports/build/_Users_jeremy_src_macports_trunk_dports_lang_gcc48/libgcc/work/gcc-4.8.1/gcc
 /pointer-set.c:60: error: integer constant is too large for ‘unsigned
 long’ type
 /opt/local/var/macports/build/_Users_jeremy_src_macports_trunk_dports_lang_gcc48/libgcc/work/gcc-4.8.1/gcc
 /pointer-set.c: In function ‘size_t hash1(const void*, long unsigned int,
 long unsigned int)’:
 /opt/local/var/macports/build/_Users_jeremy_src_macports_trunk_dports_lang_gcc48/libgcc/work/gcc-4.8.1/gcc
 /pointer-set.c:60: warning: large integer implicitly truncated to unsigned
 type
 }}}

 My hunch is that gcc's build system is checking sizeof(long) at configure
 time for x86_64 and using it for the i386 slice:

 {{{
 configure:5912: /usr/bin/gcc-4.2 -arch i386 -arch x86_64 -o conftest -g
 -L/opt/local/lib -Wl,-headerpad_max_install_names
 conftest.c  >&5
 configure:5912: $? = 0
 configure:5912: ./conftest
 configure:5912: $? = 0
 configure:5927: result: 8
 }}}

 This needs to be solved in a way similar to how we solve it in X11:
 http://cgit.freedesktop.org/xorg/xserver/tree/include/dix-config-apple-
 verbatim.h
 http://cgit.freedesktop.org/xorg/xserver/tree/include/dix-config.h.in

-- 
Ticket URL: <https://trac.macports.org/ticket/40478>
MacPorts <http://www.macports.org/>
Ports system for OS X


More information about the macports-tickets mailing list