[U-Boot-Users] u-boot link fails after removing -Os compilation option.

Hi:
I'm using u-boot v1.1.4. I wanted to remove any optimization to make debug simpler and the only optimization I have found was "-Os" option in the config.mk file; below is the change I've done:
112c112 < OPTFLAGS= -Os #-fomit-frame-pointer ---
OPTFLAGS= #-Os #-fomit-frame-pointer
Unfortunately after that change link is always failing - certain inline functions (not all) somehow cannot be resolved:
cpu/ppc4xx/libppc4xx.a(405gp_pci.o)(.text+0x8c): In function `pci_440_init': /home/leonid/pd/ppc/uboot/u-boot-1.1.4/cpu/ppc4xx/405gp_pci.c:467: undefined reference to `pci_set_region' cpu/ppc4xx/libppc4xx.a(405gp_pci.o)(.text+0xc8):/home/leonid/pd/ppc/uboo t/u-boot-1.1.4/cpu/ppc4xx/405gp_pci.c:473: undefined reference to `pci_set_region' drivers/libdrivers.a(pci_indirect.o)(.text+0x64): In function `indirect_read_config_byte': /home/leonid/pd/ppc/uboot/u-boot-1.1.4/drivers/pci_indirect.c:94: undefined reference to `out_le32' drivers/libdrivers.a(pci_indirect.o)(.text+0x8c):/home/leonid/pd/ppc/ubo ot/u-boot-1.1.4/drivers/pci_indirect.c:94: undefined reference to `out_le32' drivers/libdrivers.a(pci_indirect.o)(.text+0xac):/home/leonid/pd/ppc/ubo ot/u-boot-1.1.4/drivers/pci_indirect.c:94: undefined reference to `in_8' drivers/libdrivers.a(pci_indirect.o)(.text+0x144): In function `indirect_read_config_word': /home/leonid/pd/ppc/uboot/u-boot-1.1.4/drivers/pci_indirect.c:95: undefined reference to `out_le32' drivers/libdrivers.a(pci_indirect.o)(.text+0x16c):/home/leonid/pd/ppc/ub oot/u-boot-1.1.4/drivers/pci_indirect.c:95: undefined reference to `out_le32' drivers/libdrivers.a(pci_indirect.o)(.text+0x18c):/home/leonid/pd/ppc/ub oot/u-boot-1.1.4/drivers/pci_indirect.c:95: undefined reference to `in_le16' drivers/libdrivers.a(pci_indirect.o)(.text+0x21c): In function `indirect_read_config_dword': /home/leonid/pd/ppc/uboot/u-boot-1.1.4/drivers/pci_indirect.c:96: undefined reference to `out_le32' drivers/libdrivers.a(pci_indirect.o)(.text+0x244):/home/leonid/pd/ppc/ub oot/u-boot-1.1.4/drivers/pci_indirect.c:96: undefined reference to `out_le32' drivers/libdrivers.a(pci_indirect.o)(.text+0x250):/home/leonid/pd/ppc/ub oot/u-boot-1.1.4/drivers/pci_indirect.c:96: undefined reference to `in_le32' drivers/libdrivers.a(pci_indirect.o)(.text+0x2e0): In function `indirect_write_config_byte': /home/leonid/pd/ppc/uboot/u-boot-1.1.4/drivers/pci_indirect.c:102: undefined reference to `out_le32' drivers/libdrivers.a(pci_indirect.o)(.text+0x308):/home/leonid/pd/ppc/ub oot/u-boot-1.1.4/drivers/pci_indirect.c:102: undefined reference to `out_le32' drivers/libdrivers.a(pci_indirect.o)(.text+0x330):/home/leonid/pd/ppc/ub oot/u-boot-1.1.4/drivers/pci_indirect.c:102: undefined reference to `out_8' drivers/libdrivers.a(pci_indirect.o)(.text+0x3b4): In function `indirect_write_config_word': /home/leonid/pd/ppc/uboot/u-boot-1.1.4/drivers/pci_indirect.c:103: undefined reference to `out_le32' drivers/libdrivers.a(pci_indirect.o)(.text+0x3dc):/home/leonid/pd/ppc/ub oot/u-boot-1.1.4/drivers/pci_indirect.c:103: undefined reference to `out_le32' drivers/libdrivers.a(pci_indirect.o)(.text+0x404):/home/leonid/pd/ppc/ub oot/u-boot-1.1.4/drivers/pci_indirect.c:103: undefined reference to `out_le16' drivers/libdrivers.a(pci_indirect.o)(.text+0x484): In function `indirect_write_config_dword': /home/leonid/pd/ppc/uboot/u-boot-1.1.4/drivers/pci_indirect.c:104: undefined reference to `out_le32' drivers/libdrivers.a(pci_indirect.o)(.text+0x4ac):/home/leonid/pd/ppc/ub oot/u-boot-1.1.4/drivers/pci_indirect.c:104: undefined reference to `out_le32' drivers/libdrivers.a(pci_indirect.o)(.text+0x4bc):/home/leonid/pd/ppc/ub oot/u-boot-1.1.4/drivers/pci_indirect.c:104: undefined reference to `out_le32' drivers/libdrivers.a(pci_indirect.o)(.text+0x534): In function `pci_setup_indirect': /home/leonid/pd/ppc/uboot/u-boot-1.1.4/drivers/pci_indirect.c:109: undefined reference to `pci_set_ops' make: *** [u-boot] Error 1
What can be a problem? Only PCI part looks not happy...
Thanks,
Leonid.

In message FAB00A8DC59FAB42B13C2B3B0F6877010F6187BA@ehost011-3.exch011.intermedia.net you wrote:
Hi:
I'm using u-boot v1.1.4. I wanted to remove any optimization to make debug simpler and the only optimization I have found was "-Os" option in the config.mk file; below is the change I've done:
...
Unfortunately after that change link is always failing - certain inline
Don't do it, then.
Best regards,
Wolfgang Denk

Don't do it, then.
Why?
Sometimes it's nice to remove -Os to see what gets silently removed from the build that you were not aware of. I've done this before on an older version and learned a few new details of the build. In my case the 'extern __inline__' in include/pci.h for pci_set_region and pci_set_ops gave me some troubles. I think this thread might be relevant: http://gcc.gnu.org/ml/gcc/2005-07/msg01166.html
participants (3)
-
JH
-
Leonid
-
Wolfgang Denk