mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 00:32:25 -04:00
csu: drop support for GCJ
Remove .jcr sections and related infrastructure. This has no impact on
existing binaries and the toolchain remains capability of linking them,
but would require different (or additional) csu files.
GCC removed GCJ from trunk in on September 30, 2016. Our support came
in with D17587 for compatibility with old object files. It was roughly
contemporaneous with GCC 6.5, the last release with GCJ support. At
this point we don't even have a compiler port capable of producing GCJ
binaries so there is no need to carry this around any more.
For reference see:
https://en.wikipedia.org/wiki/GNU_Compiler_for_Java#History
Reviewed by: kib, emaste
Discussed with: imp
Sponsored by: SRI International
Differential Revision: https://reviews.freebsd.org/D49882
This commit is contained in:
parent
ea231471d0
commit
a60615d5be
4 changed files with 3 additions and 67 deletions
|
|
@ -98,36 +98,3 @@ asm (
|
|||
".popsection \n"
|
||||
);
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Handler for gcj. These provide a _Jv_RegisterClasses function and fill
|
||||
* out the .jcr section. We just need to call this function with a pointer
|
||||
* to the appropriate section.
|
||||
*/
|
||||
extern void _Jv_RegisterClasses(void *) __weak_symbol;
|
||||
static void register_classes(void) __used;
|
||||
|
||||
static crt_func __JCR_LIST__[] __section(".jcr") __used = { };
|
||||
|
||||
#ifndef CTORS_CONSTRUCTORS
|
||||
__attribute__((constructor))
|
||||
#endif
|
||||
static void
|
||||
register_classes(void)
|
||||
{
|
||||
|
||||
if (_Jv_RegisterClasses != NULL && __JCR_LIST__[0] != 0)
|
||||
_Jv_RegisterClasses(__JCR_LIST__);
|
||||
}
|
||||
|
||||
/*
|
||||
* We can't use constructors when they use the .ctors section as they may be
|
||||
* placed before __CTOR_LIST__.
|
||||
*/
|
||||
#ifdef CTORS_CONSTRUCTORS
|
||||
asm (
|
||||
".pushsection .init \n"
|
||||
"\t" INIT_CALL_SEQ(register_classes) "\n"
|
||||
".popsection \n"
|
||||
);
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -26,10 +26,6 @@
|
|||
|
||||
typedef void (*crt_func)(void);
|
||||
|
||||
static crt_func __JCR_END__[] __section(".jcr") __used = {
|
||||
(crt_func)0
|
||||
};
|
||||
|
||||
#ifdef HAVE_CTORS
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -38,9 +38,6 @@
|
|||
|
||||
typedef void (*func_ptr)(void);
|
||||
|
||||
extern volatile int jcr_run;
|
||||
extern const func_ptr *jcr_ptr;
|
||||
extern const void *jcr_func_ptr;
|
||||
extern volatile int ctors_run;
|
||||
extern volatile int preinit_array_run;
|
||||
extern volatile int preinit_array_state;
|
||||
|
|
@ -48,37 +45,11 @@ extern volatile int init_array_run;
|
|||
extern volatile int init_array_state;
|
||||
|
||||
#ifndef DSO_BASE
|
||||
volatile int jcr_run;
|
||||
const func_ptr *jcr_ptr;
|
||||
volatile int ctors_run;
|
||||
volatile int preinit_array_run;
|
||||
volatile int preinit_array_state = -1;
|
||||
volatile int init_array_run;
|
||||
volatile int init_array_state = -1;
|
||||
|
||||
void _Jv_RegisterClasses(const func_ptr *);
|
||||
|
||||
__section(".jcr") __used static func_ptr jcr_func = (func_ptr)1;
|
||||
const void *jcr_func_ptr = &jcr_func;
|
||||
|
||||
void
|
||||
_Jv_RegisterClasses(const func_ptr *jcr)
|
||||
{
|
||||
|
||||
jcr_run = 1;
|
||||
jcr_ptr = jcr;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef DSO_LIB
|
||||
ATF_TC_WITHOUT_HEAD(jcr_test);
|
||||
ATF_TC_BODY(jcr_test, tc)
|
||||
{
|
||||
|
||||
ATF_REQUIRE_MSG(jcr_run == 1, ".jcr not run");
|
||||
ATF_REQUIRE_MSG(jcr_ptr == jcr_func_ptr,
|
||||
"Incorrect pointer passed to _Jv_RegisterClasses");
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef DSO_BASE
|
||||
|
|
@ -160,7 +131,6 @@ ATF_TC_BODY(init_array_test, tc)
|
|||
ATF_TP_ADD_TCS(tp)
|
||||
{
|
||||
|
||||
ATF_TP_ADD_TC(tp, jcr_test);
|
||||
ATF_TP_ADD_TC(tp, ctors_test);
|
||||
ATF_TP_ADD_TC(tp, preinit_array_test);
|
||||
ATF_TP_ADD_TC(tp, init_array_test);
|
||||
|
|
|
|||
|
|
@ -1065,6 +1065,9 @@ and
|
|||
.It .jcr
|
||||
This section holds information about Java classes that must
|
||||
be registered.
|
||||
It is obsolete and binaries created for
|
||||
.Fx 15
|
||||
or later do not process it.
|
||||
.It .eh_frame
|
||||
This section holds information used for C++ exception-handling.
|
||||
.El
|
||||
|
|
|
|||
Loading…
Reference in a new issue