History log of /netbsd-current/lib/csu/common/Makefile.inc
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: pgoyette-compat-20190127 pgoyette-compat-20190118
# 1.35 28-Dec-2018 christos

Undo previous; breaks macppc/m68k (at least)


# 1.34 27-Dec-2018 christos

Enable initfini array support for everyone.


Revision tags: pgoyette-compat-1226
# 1.33 26-Nov-2018 joerg

Do not pass the main object handle from the assembler startup stub to
the common ___start routine. It's only used for a pointless magic
version check. Thanks to martin@ for testing various architectures.


Revision tags: pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 netbsd-8-0-RELEASE phil-wifi-base pgoyette-compat-0625 netbsd-8-0-RC2 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 netbsd-8-0-RC1 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base matt-nb8-mediatek-base perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320 bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.32 01-Jun-2016 joerg

branches: 1.32.14;
Revert -O1 hack for GCC 5.3, replaced by workaround in the code.


# 1.31 10-May-2016 martin

We need the -O1 hack (for gcc 5.3) for crtbegin.c as well.
Works around PR toolchain/51121.


# 1.30 01-May-2016 martin

Revert previous (fallout is more subtle but there).
Rework the conditionon so it depends on .S existence instead of an arch
list.


# 1.29 30-Apr-2016 martin

Gcc 5.3 seems to do fine compiling this for sparc64, so exclude it
from the -O1 hack


# 1.28 04-Apr-2016 martin

For the benefit of compilers not using our native C runtime environment,
install a "sysident.o" file providing the note identifying NetBSD
executables (and marking the currently installed version).


# 1.27 29-Mar-2016 skrll

crt0-common.c is miscompiled by gcc 5.3 on evbarm with -O2 so use -O1. Do
this for all non-x86 arches.


# 1.26 27-Mar-2016 mrg

add a hack for GCC 5 and non-x86 platforms:

build crtbeginS.o with -O1 as GCC tries to be very smart with the
__DTOR_LIST__ as it believes it knows the size of the array at
compile time (which is not true until link time). on SPARC and
MIPS, the result was emitting a call to 0.

technically, i believe that GCC isn't "wrong" to make this choice,
as the array is declared with a well-known initialiser size in the
crtbegin.c compilation unit, and we have noticed that the libgcc
version of this code has some hacks added, most likely to avoid
being bitten by this optimisation.


this makes sshd work for me on earm and sparc with GCC 5.


Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 tls-maxphys-base
# 1.25 04-Mar-2014 joerg

Add GENASSYM_CPPFLAGS in two more places.


# 1.24 11-Jan-2014 matt

Using ${LD} -x screws up BE arm. Use ${OBJCOPY} ${OBJCOPYLIBFLAGS} instead
so the $a/$t/$d symbols are preserved.


# 1.23 17-Nov-2013 martin

Simplify previous by using CSU_MACHINE_ARCH. Hint from Takeshi Nakayama.


# 1.22 16-Nov-2013 martin

We do not want to build the code model markes when creating the 32bit
compat libs for sparc64


# 1.21 14-Nov-2013 martin

On sparc64: create additional "marker" object files, that can be used by the
compiler to encode the used code model in binaries.


# 1.20 11-Nov-2013 joerg

Explicitly depend on sys/param.h to pick up __NetBSD_Version changes.


# 1.19 18-Sep-2013 uwe

Fix previous: use PICFLAGS for crtbeginS.o
Should unbreak sh3 builds.

XXX: PICFLAGS is defined in bsd.lib.mk which lib/csu does not use.
For now supply a local definition. joerg@, please fix appropriately.


# 1.18 12-Sep-2013 joerg

Pass PICFLAGS down to cc-as-as and use __PIC__ to decide if it is small
vs big PIC mode. Retire -DPIC and -DBIGPIC.


# 1.17 10-Sep-2013 matt

Add support for a NetBSD MARCH elf note to record the MACHINE_ARCH for
which a program was compiled.


# 1.16 05-Aug-2013 matt

Alpha needs crtfm.o for USE_COMPILERCRTSTUFF=no


Revision tags: riastradh-drm2-base2 riastradh-drm2-base1
# 1.15 18-Jul-2013 matt

Only supplie -fPIE to crtbegin.c if MKPIC is yes.


Revision tags: riastradh-drm2-base
# 1.14 17-Jul-2013 martin

branches: 1.14.2;
Use -fPIE for crtbegin.o (instead of -fpie).
Fixes linking the firefox js shell. Ok: joerg@


# 1.13 05-Jul-2013 joerg

Only install crtbeginS.o, crtbeginT.o and crtendS.o when MKPIC=yes.


# 1.12 27-Jun-2013 matt

Switch arm, earm, powerpc to use crtbegin.c
Use -fpie for crtbegin.


# 1.11 27-Jun-2013 matt

Add -fPIC to compile of crtbeginS.o


# 1.10 25-Jun-2013 matt

Reorder to avoid !exists
Add a crtbegin.h dependency


# 1.9 22-Jun-2013 matt

Add a common crtbegin.c file and use a machine dependent crtbegin.h to
fill in .init/.fini.
Add mips support for USE_COMPILERCRTSTUFF=no (compiled only)


# 1.8 22-Jun-2013 matt

Allow crtbegin to be a C file.


Revision tags: agc-symver-base yamt-pagecache-base8 yamt-pagecache-base7 yamt-pagecache-base6 yamt-pagecache-base5 yamt-pagecache-base4
# 1.7 25-Mar-2012 joerg

branches: 1.7.2;
Don't pass assembler flags to genassym, it doesn't compile.


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 netbsd-6-base
# 1.6 31-Jan-2012 uwe

Move crt0.S in front of crt0-common.c when building crt0.o and gcrt0.o.
Reading disassembly is easier when the asm crt0.S trampoline is at the
start, not hidden behind the C code in crt0-common.c.


# 1.5 31-Jan-2012 uwe

Hmm, funny. I wonder why and how did emacs VC managed to add

Warning: Permanently added the RSA host key for IP address '...' to the list of known hosts.

to the committed file. (hi, new cvs!)


# 1.4 31-Jan-2012 uwe

Use -DPIC to compile crtbeginS.o since that's what <machine/asm.h>
headers check.


Revision tags: yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base cherry-xenmp-base bouyer-quota2-nbase bouyer-quota2-base
# 1.3 31-Jan-2011 drochner

branches: 1.3.4;
use of .PARSEDIR just doesn't work with .OBJDIR, replace with .CURDIR


Revision tags: matt-mips64-premerge-20101231
# 1.2 07-Dec-2010 joerg

branches: 1.2.2;
Build assembler sources with assembler compile rules.


# 1.1 07-Aug-2010 joerg

Switch i386 and x86_64 to the new CRT layout. The crt0.c body is shared
between all platforms and a small assembler stub in crt0.S is used for
setting up the proper stack and whatever else MD needs.

Extract crti.S and crtn. from the old dot_init.h files. Prepare other
platforms that use the 6-argument form of __(_)start for this.

Rewrite the crtbegin and crtend modules in assembler to make them
compiler independent. Document the interface in README.


Revision tags: pgoyette-localcount-20161104 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.32 01-Jun-2016 joerg

Revert -O1 hack for GCC 5.3, replaced by workaround in the code.


# 1.31 10-May-2016 martin

We need the -O1 hack (for gcc 5.3) for crtbegin.c as well.
Works around PR toolchain/51121.


# 1.30 01-May-2016 martin

Revert previous (fallout is more subtle but there).
Rework the conditionon so it depends on .S existence instead of an arch
list.


# 1.29 30-Apr-2016 martin

Gcc 5.3 seems to do fine compiling this for sparc64, so exclude it
from the -O1 hack


# 1.28 04-Apr-2016 martin

For the benefit of compilers not using our native C runtime environment,
install a "sysident.o" file providing the note identifying NetBSD
executables (and marking the currently installed version).


# 1.27 29-Mar-2016 skrll

crt0-common.c is miscompiled by gcc 5.3 on evbarm with -O2 so use -O1. Do
this for all non-x86 arches.


# 1.26 27-Mar-2016 mrg

add a hack for GCC 5 and non-x86 platforms:

build crtbeginS.o with -O1 as GCC tries to be very smart with the
__DTOR_LIST__ as it believes it knows the size of the array at
compile time (which is not true until link time). on SPARC and
MIPS, the result was emitting a call to 0.

technically, i believe that GCC isn't "wrong" to make this choice,
as the array is declared with a well-known initialiser size in the
crtbegin.c compilation unit, and we have noticed that the libgcc
version of this code has some hacks added, most likely to avoid
being bitten by this optimisation.


this makes sshd work for me on earm and sparc with GCC 5.


Revision tags: netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 tls-maxphys-base
# 1.25 04-Mar-2014 joerg

Add GENASSYM_CPPFLAGS in two more places.


# 1.24 11-Jan-2014 matt

Using ${LD} -x screws up BE arm. Use ${OBJCOPY} ${OBJCOPYLIBFLAGS} instead
so the $a/$t/$d symbols are preserved.


# 1.23 17-Nov-2013 martin

Simplify previous by using CSU_MACHINE_ARCH. Hint from Takeshi Nakayama.


# 1.22 16-Nov-2013 martin

We do not want to build the code model markes when creating the 32bit
compat libs for sparc64


# 1.21 14-Nov-2013 martin

On sparc64: create additional "marker" object files, that can be used by the
compiler to encode the used code model in binaries.


# 1.20 11-Nov-2013 joerg

Explicitly depend on sys/param.h to pick up __NetBSD_Version changes.


# 1.19 18-Sep-2013 uwe

Fix previous: use PICFLAGS for crtbeginS.o
Should unbreak sh3 builds.

XXX: PICFLAGS is defined in bsd.lib.mk which lib/csu does not use.
For now supply a local definition. joerg@, please fix appropriately.


# 1.18 12-Sep-2013 joerg

Pass PICFLAGS down to cc-as-as and use __PIC__ to decide if it is small
vs big PIC mode. Retire -DPIC and -DBIGPIC.


# 1.17 10-Sep-2013 matt

Add support for a NetBSD MARCH elf note to record the MACHINE_ARCH for
which a program was compiled.


# 1.16 05-Aug-2013 matt

Alpha needs crtfm.o for USE_COMPILERCRTSTUFF=no


Revision tags: riastradh-drm2-base2 riastradh-drm2-base1
# 1.15 18-Jul-2013 matt

Only supplie -fPIE to crtbegin.c if MKPIC is yes.


Revision tags: riastradh-drm2-base
# 1.14 17-Jul-2013 martin

branches: 1.14.2;
Use -fPIE for crtbegin.o (instead of -fpie).
Fixes linking the firefox js shell. Ok: joerg@


# 1.13 05-Jul-2013 joerg

Only install crtbeginS.o, crtbeginT.o and crtendS.o when MKPIC=yes.


# 1.12 27-Jun-2013 matt

Switch arm, earm, powerpc to use crtbegin.c
Use -fpie for crtbegin.


# 1.11 27-Jun-2013 matt

Add -fPIC to compile of crtbeginS.o


# 1.10 25-Jun-2013 matt

Reorder to avoid !exists
Add a crtbegin.h dependency


# 1.9 22-Jun-2013 matt

Add a common crtbegin.c file and use a machine dependent crtbegin.h to
fill in .init/.fini.
Add mips support for USE_COMPILERCRTSTUFF=no (compiled only)


# 1.8 22-Jun-2013 matt

Allow crtbegin to be a C file.


Revision tags: agc-symver-base yamt-pagecache-base8 yamt-pagecache-base7 yamt-pagecache-base6 yamt-pagecache-base5 yamt-pagecache-base4
# 1.7 25-Mar-2012 joerg

branches: 1.7.2;
Don't pass assembler flags to genassym, it doesn't compile.


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 netbsd-6-base
# 1.6 31-Jan-2012 uwe

Move crt0.S in front of crt0-common.c when building crt0.o and gcrt0.o.
Reading disassembly is easier when the asm crt0.S trampoline is at the
start, not hidden behind the C code in crt0-common.c.


# 1.5 31-Jan-2012 uwe

Hmm, funny. I wonder why and how did emacs VC managed to add

Warning: Permanently added the RSA host key for IP address '...' to the list of known hosts.

to the committed file. (hi, new cvs!)


# 1.4 31-Jan-2012 uwe

Use -DPIC to compile crtbeginS.o since that's what <machine/asm.h>
headers check.


Revision tags: yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base cherry-xenmp-base bouyer-quota2-nbase bouyer-quota2-base
# 1.3 31-Jan-2011 drochner

branches: 1.3.4;
use of .PARSEDIR just doesn't work with .OBJDIR, replace with .CURDIR


Revision tags: matt-mips64-premerge-20101231
# 1.2 07-Dec-2010 joerg

branches: 1.2.2;
Build assembler sources with assembler compile rules.


# 1.1 07-Aug-2010 joerg

Switch i386 and x86_64 to the new CRT layout. The crt0.c body is shared
between all platforms and a small assembler stub in crt0.S is used for
setting up the proper stack and whatever else MD needs.

Extract crti.S and crtn. from the old dot_init.h files. Prepare other
platforms that use the 6-argument form of __(_)start for this.

Rewrite the crtbegin and crtend modules in assembler to make them
compiler independent. Document the interface in README.