* Link-time failures from "simple" CFLAGS changes
@ 2002-01-07 22:01 mod+linuxppc-dev
2002-01-07 22:10 ` David Edelsohn
2002-01-07 22:15 ` Tom Rini
0 siblings, 2 replies; 3+ messages in thread
From: mod+linuxppc-dev @ 2002-01-07 22:01 UTC (permalink / raw)
To: linuxppc-dev
When I change -O2 to -O0 in my CFLAGS definition in Makefile thus:
CFLAGS := -g $(CPPFLAGS) -Wall -Wstrict-prototypes -Wno-trigraphs -O0 \
-fno-strict-aliasing -fno-common
CFLAGS := -g $(CPPFLAGS) -Wall -Wstrict-prototypes -Wno-trigraphs -O2 \
-fno-strict-aliasing -fno-common
...I am astounded to see thousands of unresolved references
at kernel link time. WTF? Any ideas? These are the
sorts of symbols that come up undefined:
after __bad_udelay before between clear_user copy_from_user copy_siginfo
copy_to_user dcacheFlushSingle dcacheInvalidateSingle dev_load down
down_interruptible down_trylock DQUOT_ALLOC_BLOCK DQUOT_FREE_BLOCK
DQUOT_PREALLOC_BLOCK eieio empty_stack fib_find_info fn_flush_list
fn_key_eq fn_key_leq frag_alloc_queue frag_free_queue frag_kfree_skb
free_pgd_fast free_pgd_slow get_native_tbl get_order get_pgd_fast
get_rtcl get_tbl get_tbu __get_user_bad htonl htons in_8 inet_getid
inet_putpeer in_le16 in_le32 ipc_buildid ipc_checkid ipc_get ipc_lock
ipc_lockall ipc_unlock ipc_unlockall ld_le32 maybe_unmark_and_push
ntohl ntohs out_8 out_be32 out_le16 out_le32 pcibios_make_OF_bus_map
pcibios_set_master phys_to_virt pmd_populate pop_stack prefetch
prefetchw pte_free_slow __put_user_bad rotate_left rtnetlink_rcv_skb SBI
__skb_cb_too_small_for_tcp sockfd_put socki_lookup strncpy_from_user
strnlen_user tb_ticks_since tcpdiag_rcv_skb tcp_need_reset
tcp_paws_discard tcp_replace_ts_recent tcp_store_ts_recent __udelay
unix_get_socket unix_release_addr up __USE_RTC verify_area virt_to_bus
virt_to_phys __xchg_called_with_bad_pointer xprt_move_iov
This isn't a showstopper problem for me but I was so surprised to see
it that I'm curious about its cause, so thanks for any enlightenment.
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: Link-time failures from "simple" CFLAGS changes
2002-01-07 22:01 Link-time failures from "simple" CFLAGS changes mod+linuxppc-dev
@ 2002-01-07 22:10 ` David Edelsohn
2002-01-07 22:15 ` Tom Rini
1 sibling, 0 replies; 3+ messages in thread
From: David Edelsohn @ 2002-01-07 22:10 UTC (permalink / raw)
To: mod+linuxppc-dev; +Cc: linuxppc-dev
>>>>> linuxppc-dev writes:
> When I change -O2 to -O0 in my CFLAGS definition in Makefile thus:
> CFLAGS := -g $(CPPFLAGS) -Wall -Wstrict-prototypes -Wno-trigraphs -O0 \
> -fno-strict-aliasing -fno-common
> CFLAGS := -g $(CPPFLAGS) -Wall -Wstrict-prototypes -Wno-trigraphs -O2 \
> -fno-strict-aliasing -fno-common
> ...I am astounded to see thousands of unresolved references
> at kernel link time. WTF? Any ideas?
GCC only inlines functions when optimizing and the Linux kernel
assumes inlining and other optimizations only present at -O2. The Linux
kernel requires optimization at least, and only really is tested at -O2.
David
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Link-time failures from "simple" CFLAGS changes
2002-01-07 22:01 Link-time failures from "simple" CFLAGS changes mod+linuxppc-dev
2002-01-07 22:10 ` David Edelsohn
@ 2002-01-07 22:15 ` Tom Rini
1 sibling, 0 replies; 3+ messages in thread
From: Tom Rini @ 2002-01-07 22:15 UTC (permalink / raw)
To: mod+linuxppc-dev; +Cc: linuxppc-dev
On Mon, Jan 07, 2002 at 05:01:51PM -0500, mod+linuxppc-dev@MissionCriticalLinux.com wrote:
> When I change -O2 to -O0 in my CFLAGS definition in Makefile thus:
[snip]
> ...I am astounded to see thousands of unresolved references
> at kernel link time. WTF? Any ideas? These are the
> sorts of symbols that come up undefined:
You need at least -O1 for the kernel to compile. I _think_ this is
documented somewhere even, but I don't recall where right now.
--
Tom Rini (TR1265)
http://gate.crashing.org/~trini/
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2002-01-07 22:15 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-01-07 22:01 Link-time failures from "simple" CFLAGS changes mod+linuxppc-dev
2002-01-07 22:10 ` David Edelsohn
2002-01-07 22:15 ` Tom Rini
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox