develooper Front page | perl.perl5.porters | Postings from September 2012

Re: unhappy darwin -Dusemorebits (was Re: Smoke [5.17.4]v5.17.3-184-g699aa44 FAIL(F) darwin 12.1.0 (Intel Core 2 Duo/))

From:
Tony Cook
Date:
September 1, 2012 16:28
Subject:
Re: unhappy darwin -Dusemorebits (was Re: Smoke [5.17.4]v5.17.3-184-g699aa44 FAIL(F) darwin 12.1.0 (Intel Core 2 Duo/))
Message ID:
20120901232804.GB20357@mars.tony.develop-help.com
On Sun, Sep 02, 2012 at 08:50:33AM +1000, Tony Cook wrote:
> The code is built with usemorebits, hence uselongdouble, so the NV
> element would force 16-byte alignment.
> 
> So the compiler is correct to assume 16-byte alignment (assuming I
> remember the x64 ABI correctly).

# based on Configure
bash-3.2$ cc -oalignbytes alignbytes.c 
bash-3.2$ ./alignbytes
16
bash-3.2$ cat alignbytes.c 
#include <stdio.h>
typedef long double NV;
struct foobar {
  char foo;
  NV bar;
} try_algn;
int main()
{
  printf("%d\n", (int)((char *)&try_algn.bar - (char *)&try_algn.foo));
  return(0);
}

But:

neptune:perl tony$ grep alignbytes config.sh
alignbytes='8'

Urk:

wctomb() found.
 
writev() found.
 
You seem to be either cross-compiling or doing a multiarchitecture build,
skipping the memory alignment check.

Checking how long a character is (in bits)...
What is the length of a character (in bits)? [8]  

Presumably because of:

: Check if is a multiplatform env
case "$osname" in
next|rhapsody|darwin) multiarch="$define" ;;
esac
case "$multiarch" in
''|[nN]*) multiarch="$undef" ;;
esac


Tony



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About