[fpc-pascal] Cross-building on from Linux/x86-64 to Linux/i386 (was: Win64 release of FPC 2.6.2 missing)

Bruce Tulloch pascal at causal.com
Fri May 24 11:42:19 CEST 2013


Yes, that's what thought, but why the difference between the cross
compiled squeeze/i386 case (which works) and the cross compiled
wheezy/i386 one (which does not)?

That is, both are cross builds, both are building the same code in the
same way, the only difference is the crossroot against which they're
built.

The link.res file differences between them seems moot:

*** /tmp/link-squeeze-i386-cross.res    2013-05-24 19:23:25.000000000 +1000
--- /tmp/link-wheezy-i386-cross.res    2013-05-24 19:19:29.000000000 +1000
***************
*** 1,3 ****
--- 1,7 ----
+ SEARCH_DIR("/usr/local/opt/chroot/i386-linux-wheezy/usr/lib/gcc/i486-linux-gnu/4.4/")
+ SEARCH_DIR("/usr/local/opt/chroot/i386-linux-wheezy/usr/local/lib/")
+ SEARCH_DIR("/usr/local/opt/chroot/i386-linux-wheezy/usr/lib/i386-linux-gnu/")
+ SEARCH_DIR("/usr/local/opt/chroot/i386-linux-wheezy/lib/i386-linux-gnu/")
  SEARCH_DIR("/home/bruce/.home/hg/lazarus/lcl/units/i386-linux/gtk2/")
  SEARCH_DIR("/home/bruce/.home/hg/lazarus/lcl/units/i386-linux/")
  SEARCH_DIR("/home/bruce/.home/hg/lazarus/components/lazutils/lib/i386-linux/")
***************
*** 103,108 ****
--- 107,114 ----
  SEARCH_DIR("/usr/local/lib/fpc/2.7.1/units/i386-linux/gdbm/")
  SEARCH_DIR("/usr/local/lib/fpc/2.7.1/")
  INPUT(
+ /usr/local/opt/chroot/i386-linux-wheezy/usr/lib/i386-linux-gnu/crti.o
+ /usr/local/opt/chroot/i386-linux-wheezy/usr/lib/gcc/i486-linux-gnu/4.4/crtbegin.o
  test-interfaces.o
  test-interfaces.or
  /usr/local/lib/fpc/2.7.1/units/i386-linux/rtl/system.o
***************
*** 374,379 ****
--- 380,389 ----
  GROUP(
  -lc
  )
+ INPUT(
+ /usr/local/opt/chroot/i386-linux-wheezy/usr/lib/gcc/i486-linux-gnu/4.4/crtend.o
+ /usr/local/opt/chroot/i386-linux-wheezy/usr/lib/i386-linux-gnu/crtn.o
+ )
  ENTRY(_start)
  SECTIONS
  {

That is, the wheezy case has four additional search paths and it has
four additional INPUT statement lines (adding crti.o, crtbegin.o,
crtend.o and crtn.o). These differences do not appear material. If the
INPUT lines are removed from the wheezy case and ppas.sh run, it still
does not link.

The native build is very similar too (see below), I can't see any
dependency differences that would explain why gcc is not pulled in for
the wheezy/i386 cross compile case but it IS pulled in for the
squeeze/i386 cross compile AND the wheezy/x86_64 native compile.

Something is affecting the linker's behaviour which is NOT in the
link.res script I think.

Bruce

*** /tmp/link-wheezy-x86_64-native-summary.res    2013-05-24
19:36:41.000000000 +1000
--- /tmp/link-wheezy-i386-cross-summary.res    2013-05-24
19:36:58.000000000 +1000
***************
*** 1,15 ****
! SEARCH_DIR("/lib64/")
! SEARCH_DIR("/home/bruce/.home/hg/lazarus/lcl/units/x86_64-linux/gtk2/")
! SEARCH_DIR("/home/bruce/.home/hg/lazarus/lcl/units/x86_64-linux/")
! SEARCH_DIR("/home/bruce/.home/hg/lazarus/components/lazutils/lib/x86_64-linux/")
! SEARCH_DIR("/usr/local/lib/fpc/2.7.1/units/x86_64-linux/utmp/")
! SEARCH_DIR("/usr/local/lib/fpc/2.7.1/units/x86_64-linux/svgalib/")
! SEARCH_DIR("/usr/local/lib/fpc/2.7.1/units/x86_64-linux/lexyacc/")
  SEARCH_DIR("/usr/local/lib/fpc/2.7.1/")
  INPUT(
! /usr/local/lib/fpc/2.7.1/units/x86_64-linux/rtl/cprt0.o
  test-interfaces.o
  test-interfaces.or
  )
  INPUT(
  -ldl
--- 1,18 ----
! SEARCH_DIR("/usr/local/opt/chroot/i386-linux-wheezy/usr/lib/gcc/i486-linux-gnu/4.4/")
! SEARCH_DIR("/usr/local/opt/chroot/i386-linux-wheezy/usr/local/lib/")
! SEARCH_DIR("/usr/local/opt/chroot/i386-linux-wheezy/usr/lib/i386-linux-gnu/")
! SEARCH_DIR("/usr/local/opt/chroot/i386-linux-wheezy/lib/i386-linux-gnu/")
! SEARCH_DIR("/usr/local/lib/fpc/2.7.1/units/i386-linux/unixutil/")
! SEARCH_DIR("/usr/local/lib/fpc/2.7.1/units/i386-linux/libc/")
! SEARCH_DIR("/usr/local/lib/fpc/2.7.1/units/i386-linux/utmp/")
! SEARCH_DIR("/usr/local/lib/fpc/2.7.1/units/i386-linux/svgalib/")
  SEARCH_DIR("/usr/local/lib/fpc/2.7.1/")
  INPUT(
! /usr/local/opt/chroot/i386-linux-wheezy/usr/lib/i386-linux-gnu/crti.o
! /usr/local/opt/chroot/i386-linux-wheezy/usr/lib/gcc/i486-linux-gnu/4.4/crtbegin.o
  test-interfaces.o
  test-interfaces.or
+ /usr/local/lib/fpc/2.7.1/units/i386-linux/rtl/si_c21.o
  )
  INPUT(
  -ldl
***************
*** 29,39 ****
  GROUP(
  -lc
  )
  ENTRY(_start)
  SECTIONS
  {
!   PROVIDE (__executable_start = 0x0400000); . = 0x0400000 +  SIZEOF_HEADERS;
!   . = 0 +  SIZEOF_HEADERS;
    .interp         : { *(.interp) }
    .hash           : { *(.hash) }
    .dynsym         : { *(.dynsym) }
--- 32,45 ----
  GROUP(
  -lc
  )
+ INPUT(
+ /usr/local/opt/chroot/i386-linux-wheezy/usr/lib/gcc/i486-linux-gnu/4.4/crtend.o
+ /usr/local/opt/chroot/i386-linux-wheezy/usr/lib/i386-linux-gnu/crtn.o
+ )
  ENTRY(_start)
  SECTIONS
  {
!   PROVIDE (__executable_start = 0x010000); . = 0x010000 + SIZEOF_HEADERS;
    .interp         : { *(.interp) }
    .hash           : { *(.hash) }
    .dynsym         : { *(.dynsym) }
***************
*** 90,97 ****
    }
    . = ALIGN (0x1000) - ((0x1000 - .) & (0x1000 - 1));
    .dynamic        : { *(.dynamic) }
!   .got            : { *(.got .toc) }
!   .got.plt        : { *(.got.plt .toc.plt) }
    .data           :
    {
      *(.data .data.* .gnu.linkonce.d.*)
--- 96,103 ----
    }
    . = ALIGN (0x1000) - ((0x1000 - .) & (0x1000 - 1));
    .dynamic        : { *(.dynamic) }
!   .got            : { *(.got) }
!   .got.plt        : { *(.got.plt) }
    .data           :
    {
      *(.data .data.* .gnu.linkonce.d.*)
***************
*** 114,143 ****
    PROVIDE (end = .);
    .stab          0 : { *(.stab) }
    .stabstr       0 : { *(.stabstr) }
-   /* DWARF debug sections.
-      Symbols in the DWARF debugging sections are relative to the beginning
-      of the section so we begin them at 0.  */
-   /* DWARF 1 */
-   .debug          0 : { *(.debug) }
-   .line           0 : { *(.line) }
-   /* GNU DWARF 1 extensions */
-   .debug_srcinfo  0 : { *(.debug_srcinfo) }
-   .debug_sfnames  0 : { *(.debug_sfnames) }
-   /* DWARF 1.1 and DWARF 2 */
-   .debug_aranges  0 : { *(.debug_aranges) }
-   .debug_pubnames 0 : { *(.debug_pubnames) }
-   /* DWARF 2 */
-   .debug_info     0 : { *(.debug_info .gnu.linkonce.wi.*) }
-   .debug_abbrev   0 : { *(.debug_abbrev) }
-   .debug_line     0 : { *(.debug_line) }
-   .debug_frame    0 : { *(.debug_frame) }
-   .debug_str      0 : { *(.debug_str) }
-   .debug_loc      0 : { *(.debug_loc) }
-   .debug_macinfo  0 : { *(.debug_macinfo) }
-   /* SGI/MIPS DWARF 2 extensions */
-   .debug_weaknames 0 : { *(.debug_weaknames) }
-   .debug_funcnames 0 : { *(.debug_funcnames) }
-   .debug_typenames 0 : { *(.debug_typenames) }
-   .debug_varnames  0 : { *(.debug_varnames) }
-   /DISCARD/ : { *(.note.GNU-stack) }
  }
--- 120,123 ----



More information about the fpc-pascal mailing list