in reply to [Linux] Controlling 32-bit mode vs 64-bit mode

$ ./Configure -Duse64bitall -Duselongdouble -Dusethreads -des

Should select all the right 64bit options


Enjoy, Have FUN! H.Merijn

Replies are listed 'Best First'.
Re^2: [Linux] Controlling 32-bit mode vs 64-bit mode
by syphilis (Archbishop) on Oct 09, 2015 at 08:36 UTC
    ./Configure -Duse64bitall -Duselongdouble -Dusethreads -des

    No, that didn't deliver what I was after.
    That's still a 32-bit mode build - with ivtype of 'long long', ivsize of 8, and ptrsize of 4.
    Correction: The preceding statement is true only if -Duse64bitall is replaced by -Duse64bitint. On checking, I find that the Configure process refuses to accept the "-Duse64bitall" because pointer size is only 4 bytes.

    With a 64-bit mode build I get ivtype of long, ivsize of 8, and ptrsize of 8.
    And I get that without having to specify either -Duse64bitint or -Duse64bitall.

    Cheers,
    Rob
      Just to update on some off-forum activity re this thread:
      Tux expressed the view that hints/linux.sh should be amended so that -Duse64bitall would create the build I was looking for (ivtype of long, ivsize of 8, ptrsize of 8 and -m64 in ccflags).
      But we couldn't get that set correctly. He didn't have access to a powerpc64 system, and my capability with shell scripting is very limited. (More accurately, any such capability is yet non-existent.)

      In the midst of this hackery, I found that -m64 needs *also* to be included in cppflags, ldflags and lddlflags.
      Eventually I was able to get the build I was after by leaving hints/linux.sh in its original state and running:
      sh Configure -des -Dccflags=-m64 -Dldflags=-m64 -Dlddlflags="-m64 -sha +red -O1" -Dcc=gcc
      That is essentially the same perl as I had been getting with:
      sh Configure -des -Dcc="gcc -m64"
      The only difference being that "-m64" was removed from cc, and was inserted into the various flags, as needed - exactly as I was seeking !!
      Other than that, the perl -V outputs were identical (with ivtype=long, ivsize=8 and ptrsize=8).

      However, it didn't help with the problem that had triggered this investigation.
      And, when I think about it again, it's probably not surprising that it did make no difference.
      AFAICT, operating in 64-bit mode requires that whenever "gcc" is called, "-m64" must also be called, and having a compiler named "gcc -m64" therefore looks to be a very sane way of ensuring that happens.

      Anyway, it sure is good to have the alternative that I was seeking and I'll keep such a build of perl handy for reference.
      (But I'm currently planning on staying with the -Dcc="gcc -m64" builds for as long as they don't prove to be deficient.)

      Cheers,
      Rob

        Solve it the usual way: make a wrapper that calls cc with all the right options. Configure perl with -Dcc=myperlcc; this then ought to propagate to all module installs, etc. Alternatively, you could install another gcc and use that. (Configure with the correct target triplet. I recommend also giving --program-suffix=-$versn when installing multiple gcc versions.)