linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Olaf Hering <olh@suse.de>
To: linux-hotplug@vger.kernel.org
Subject: Re: [PATCH] Add -nodefaultlibs while compiling against klibc
Date: Sun, 07 Dec 2003 21:55:59 +0000	[thread overview]
Message-ID: <marc-linux-hotplug-107083422701233@msgid-missing> (raw)
In-Reply-To: <marc-linux-hotplug-106978186702036@msgid-missing>

 On Tue, Nov 25, Martin Hicks wrote:

> Greg,
> 
> This patch adds -nodefaultlibs to LDFLAGS when compiling udev against
> klibc.  This fixes the warning that I was getting when using $(LD)=gcc
> in the versions after Makefile.klibc disappeared.  The problem was that
> it was still including a "-lc" in the call to the linker.

this gives me linker errors on ppc and ia64:


+ make udevdir=/dev KLIBC=true DEBUGúlse
gcc --static --nostdlib -nostartfiles -nodefaultlibs -o udev /usr/src/packages/BUILD/udev-008/klibc/klibc/crt0.o udev.o udev_config.o udev-add.o udev-remove.o udevdb.o logging.o namedev.o namedev_parse.o /usr/src/packages/BUILD/udev-008/libsysfs/sysfs_bus.o /usr/src/packages/BUILD/udev-008/libsysfs/sysfs_class.o /usr/src/packages/BUILD/udev-008/libsysfs/sysfs_device.o /usr/src/packages/BUILD/udev-008/libsysfs/sysfs_dir.o /usr/src/packages/BUILD/udev-008/libsysfs/sysfs_driver.o /usr/src/packages/BUILD/udev-008/libsysfs/sysfs_utils.o /usr/src/packages/BUILD/udev-008/libsysfs/dlist.o tdb/tdb.o tdb/spinlock.o klibc_fixups.o  /usr/src/packages/BUILD/udev-008/klibc/klibc/libc.a
tdb/tdb.o(.text+0x1092): In function `tdb_chainunlock_read':
: undefined reference to `__umodsi3'
tdb/tdb.o(.text+0x1132): In function `tdb_chainunlock':
: undefined reference to `__umodsi3'
tdb/tdb.o(.text+0x15c2): In function `tdb_chainlock_read':
: undefined reference to `__umodsi3'
tdb/tdb.o(.text+0x1662): In function `tdb_chainlock':
: undefined reference to `__umodsi3'
tdb/tdb.o(.text+0x2212): In function `tdb_lockkeys':
: undefined reference to `__umodsi3'
tdb/tdb.o(.text+0x2232): more undefined references to `__umodsi3' follow
/usr/src/packages/BUILD/udev-008/klibc/klibc/libc.a(vsnprintf.o)(.text+0x6e2): In function `vsnprintf':
: undefined reference to `__udivdi3'
/usr/src/packages/BUILD/udev-008/klibc/klibc/libc.a(vsnprintf.o)(.text+0x7a2): In function `vsnprintf':
: undefined reference to `__divsi3'
/usr/src/packages/BUILD/udev-008/klibc/klibc/libc.a(vsnprintf.o)(.text+0xaf2): In function `vsnprintf':
: undefined reference to `__umoddi3'
/usr/src/packages/BUILD/udev-008/klibc/klibc/libc.a(vsnprintf.o)(.text+0xb22): In function `vsnprintf':
: undefined reference to `__udivdi3'
collect2: ld returned 1 exit status
make: *** [udev] Error 1
error: Bad exit status from /var/tmp/rpm-tmp.66470 (%build)


I did that for ppc, against current bk:

diff -purNx linux udev-008.orig/klibc/klibc/arch/ppc/Makefile.inc udev-008/klibc/klibc/arch/ppc/Makefile.inc
--- udev-008.orig/klibc/klibc/arch/ppc/Makefile.inc     2002-08-17 02:54:27.000000000 +0200
+++ udev-008/klibc/klibc/arch/ppc/Makefile.inc  2003-12-07 22:40:05.000000000 +0100
@@ -8,7 +8,12 @@
 #
 
 ARCHOBJS = \
-       arch/$(ARCH)/setjmp.o
+       arch/$(ARCH)/setjmp.o \
+       libgcc/__divdi3.o \
+       libgcc/__moddi3.o \
+       libgcc/__udivdi3.o \
+       libgcc/__umoddi3.o \
+       libgcc/__udivmoddi4.o
 
 ARCHSOOBJS = $(patsubst %.o,%.lo,$(ARCHOBJS))
 


-- 
USB is for mice, FireWire is for men!

sUse lINUX ag, nÜRNBERG


-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id\x1278&alloc_id371&op=click
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

  parent reply	other threads:[~2003-12-07 21:55 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-11-25 17:30 [PATCH] Add -nodefaultlibs while compiling against klibc Martin Hicks
2003-12-02  1:13 ` Greg KH
2003-12-07 21:55 ` Olaf Hering [this message]
2003-12-08 10:02 ` Arnd Bergmann
2003-12-08 15:38 ` Martin Hicks
2003-12-08 19:17 ` Olaf Hering

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=marc-linux-hotplug-107083422701233@msgid-missing \
    --to=olh@suse.de \
    --cc=linux-hotplug@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).