Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 15 Mar 2008 23:13:05 +0200
From:      Kostik Belousov <kostikbel@gmail.com>
To:        "Bjoern A. Zeeb" <bzeeb-lists@lists.zabbadoz.net>
Cc:        FreeBSD current mailing list <current@freebsd.org>
Subject:   Re: Why is linux.ko rebuild everytime?
Message-ID:  <20080315211305.GO10374@deviant.kiev.zoral.com.ua>
In-Reply-To: <20080315084441.V50685@maildrop.int.zabbadoz.net>
References:  <20080315084441.V50685@maildrop.int.zabbadoz.net>

next in thread | previous in thread | raw e-mail | index | archive | help

--SBikYMzjhZGK9d4p
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Sat, Mar 15, 2008 at 08:46:50AM +0000, Bjoern A. Zeeb wrote:
> Hi,
>=20
> if I just do a make right after buildkernel finished successfully
> linux.ko is rebuild (even though nothing was touched).
> I have to admit I am doing make in obj/.../sys/KERNCONF/ but to
> my understanding that should not matter.
>=20
> ...
> =3D=3D=3D> linsysfs (all)
> =3D=3D=3D> linux (all)
> ln -sf=20
> /local/building/freebsd/obj/local/building/freebsd/RELENG_7/sys/DOPT/opt_=
apic.h opt_apic.h
> cc -c -O2 -fno-strict-aliasing -pipe -DCOMPAT_IA32 -DCOMPAT_LINUX32=20
> -D_KERNEL -DKLD_MODULE -std=3Dc99 -nostdinc -DHAVE_KERNEL_OPTION_HEADERS=
=20
> -include=20
> /local/building/freebsd/obj/local/building/freebsd/RELENG_7/sys/DOPT/opt_=
global.h -I. -I@ -I@/contrib/altq -finline-limit=3D8000 --param inline-unit=
-growth=3D100 --param large-function-growth=3D1000 -g -fno-omit-frame-point=
er -I/local/building/freebsd/obj/local/building/freebsd/RELENG_7/sys/DOPT -=
mcmodel=3Dkernel -mno-red-zone -mfpmath=3D387 -mno-sse -mno-sse2 -mno-mmx -=
mno-3dnow -msoft-float -fno-asynchronous-unwind-tables -ffreestanding -Wall=
 -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototype=
s -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -fformat-e=
xtensions  @/amd64/amd64/genassym.c
> sh @/kern/genassym.sh genassym.o > assym.s
> cc -c -x assembler-with-cpp -DLOCORE -O2 -fno-strict-aliasing -pipe=20
> -DCOMPAT_IA32 -DCOMPAT_LINUX32  -D_KERNEL -DKLD_MODULE -std=3Dc99 -nostdi=
nc  =20
> -DHAVE_KERNEL_OPTION_HEADERS -include=20
> /local/building/freebsd/obj/local/building/freebsd/RELENG_7/sys/DOPT/opt_=
global.h -I. -I@ -I@/contrib/altq -finline-limit=3D8000 --param inline-unit=
-growth=3D100 --param large-function-growth=3D1000 -fno-common -g -fno-omit=
-frame-pointer -I/local/building/freebsd/obj/local/building/freebsd/RELENG_=
7/sys/DOPT -mcmodel=3Dkernel -mno-red-zone  -mfpmath=3D387 -mno-sse -mno-ss=
e2 -mno-mmx -mno-3dnow  -msoft-float -fno-asynchronous-unwind-tables -ffree=
standing -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes  -Wmi=
ssing-prototypes -Wpointer-arith -Winline -Wcast-qual  -Wundef -Wno-pointer=
-sign -fformat-extensions  /local/building/freebsd/RELENG_7/sys/modules/lin=
ux/../../amd64/linux32/linux32_support.s -o linux32_support.o
> as  -o assym.o assym.s
> ld  -d -warn-common -r -d -o linux.ko.debug linux32_locore.o=20
> linux32_support.o linux32_dummy.o linux_emul.o linux_file.o linux_futex.o=
=20
> linux_getcwd.o linux_ioctl.o linux_ipc.o linux32_machdep.o linux_mib.o=20
> linux_misc.o linux_signal.o linux_socket.o linux_stats.o linux_sysctl.o=
=20
> linux32_sysent.o linux32_sysvec.o linux_uid16.o linux_util.o linux_time.o=
=20
> assym.o
> echo  linux_emul_path linux_get_osname linux_get_osrelease linux_ifname=
=20
> linux_ioctl_register_handler linux_ioctl_unregister_handler > export_syms
> awk -f=20
> /local/building/freebsd/RELENG_7/sys/modules/linux/../../conf/kmod_syms.a=
wk=20
> linux.ko.debug  export_syms | xargs -J% objcopy % linux.ko.debug
> objcopy --only-keep-debug linux.ko.debug linux.ko.symbols
> objcopy --strip-debug --add-gnu-debuglink=3Dlinux.ko.symbols linux.ko.deb=
ug=20
> linux.ko
> =3D=3D=3D> lmc (all)
> ...

I want to say first that I do not know why, and I am interesting myself
in the reason.

Some time ago I tried to understand this, but did not come to any conclusio=
n.
The points I observed are below:
1. On i386, the acpi module (absent on the amd64) also often rebuilds
without obvious reason.
2. Both linux and acpi depend on the assym.s. It seems that these are the
only modules that depend on it. For instance, svr4 depends on svr4_genassym
and does not rebuild.

I did not saw anything obvious in the web of the rules to handle *assym.
BTW, it usually tends to stabilize after several remakes.

--SBikYMzjhZGK9d4p
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (FreeBSD)

iEYEARECAAYFAkfcO+AACgkQC3+MBN1Mb4gMiACgzXDBq22P3EfZ9X9ocRRVPBH8
OnEAoMDhuTPKYipNOxuzktQa8rdi8PSC
=y7NN
-----END PGP SIGNATURE-----

--SBikYMzjhZGK9d4p--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080315211305.GO10374>