[MacPorts] #64277: gcc49 error in pointer-set.c when building for ppc64: integer constant is too large for ‘unsigned long’ type
MacPorts
noreply at macports.org
Thu Dec 23 15:17:00 UTC 2021
#64277: gcc49 error in pointer-set.c when building for ppc64: integer constant is
too large for ‘unsigned long’ type
------------------------------------------+--------------------
Reporter: barracuda156 | Owner: (none)
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version: 2.7.1
Keywords: PowerPC, Leopard, ppc64, gcc | Port: gcc49
------------------------------------------+--------------------
Compilation breaks in stage 1 with:
{{{
opt/local/var/macports/build/_opt_PPCLeopardPorts_lang_gcc49/gcc49/work/gcc-4.9.4/gcc
/pointer-set.c:45: error: integer constant is too large for ‘unsigned
long’ type
/opt/local/var/macports/build/_opt_PPCLeopardPorts_lang_gcc49/gcc49/work/gcc-4.9.4/gcc
/pointer-set.c: In function ‘size_t hash1(const void*, long unsigned int,
long unsigned int)’:
/opt/local/var/macports/build/_opt_PPCLeopardPorts_lang_gcc49/gcc49/work/gcc-4.9.4/gcc
/pointer-set.c:45: warning: large integer implicitly truncated to unsigned
type
make[3]: *** [pointer-set.o] Error 1
make[3]: *** Waiting for unfinished jobs....
make[3]: Leaving directory
`/opt/local/var/macports/build/_opt_PPCLeopardPorts_lang_gcc49/gcc49/work/build/gcc'
make[2]: *** [all-stage1-gcc] Error 2
make[2]: Leaving directory
`/opt/local/var/macports/build/_opt_PPCLeopardPorts_lang_gcc49/gcc49/work/build'
make[1]: *** [stage1-bubble] Error 2
make[1]: Leaving directory
`/opt/local/var/macports/build/_opt_PPCLeopardPorts_lang_gcc49/gcc49/work/build'
make: *** [bootstrap-lean] Error 2
make: Leaving directory
`/opt/local/var/macports/build/_opt_PPCLeopardPorts_lang_gcc49/gcc49/work/build'
Command failed: cd
"/opt/local/var/macports/build/_opt_PPCLeopardPorts_lang_gcc49/gcc49/work/build"
&& /usr/bin/make -j4 -w bootstrap-lean
Exit code: 2
Error: Failed to build gcc49: command execution failed
}}}
The source file has:
{{{
static inline size_t
hash1 (const void *p, unsigned long max, unsigned long logmax)
{
#if HOST_BITS_PER_LONG == 32
const unsigned long A = 0x9e3779b9u;
#elif HOST_BITS_PER_LONG == 64
const unsigned long A = 0x9e3779b97f4a7c16ul;
#else
const unsigned long A
= (ULONG_MAX + 1.0L) * 0.6180339887498948482045868343656381177203L;
#endif
const unsigned long shift = HOST_BITS_PER_LONG - logmax;
return ((A * (uintptr_t) p) >> shift) & (max - 1);
}
}}}
Specifically line 44-45 refer to 64 bit.
--
Ticket URL: <https://trac.macports.org/ticket/64277>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list