Hello, There is no reason for the ObjC front end to call assemble_external on these symbols, the middle-end handles this just fine via add_builtin_function.
Bootstrapped&tested on powerpc64-unknown-linux-gnu. OK for trunk? Ciao! Steven objc/ * objc-act (objc_build_ivar_assignment): Do not call assemble_external. (objc_build_global_assignment): Likewise. (objc_build_strong_cast_assignment): Likewise. * objc-next-runtime-abi-01.c: Cleanup commented-out assemble_external. * objc-next-runtime-abi-02.c: Likewise. * objc-gnu-runtime-abi-01.c: Likewise.
objc/ * objc-act (objc_build_ivar_assignment): Do not call assemble_external. (objc_build_global_assignment): Likewise. (objc_build_strong_cast_assignment): Likewise. * objc-next-runtime-abi-01.c: Cleanup commented-out assemble_external. * objc-next-runtime-abi-02.c: Likewise. * objc-gnu-runtime-abi-01.c: Likewise. Index: objc-act.c =================================================================== --- objc-act.c (revision 185603) +++ objc-act.c (working copy) @@ -3553,7 +3553,6 @@ objc_build_ivar_assignment (tree outervar, tree lh tree_cons (NULL_TREE, offs, NULL_TREE))); - assemble_external (func); return build_function_call (input_location, func, func_params); } @@ -3566,7 +3565,6 @@ objc_build_global_assignment (tree lhs, tree rhs) build_unary_op (input_location, ADDR_EXPR, lhs, 0)), NULL_TREE)); - assemble_external (objc_assign_global_decl); return build_function_call (input_location, objc_assign_global_decl, func_params); } @@ -3580,7 +3578,6 @@ objc_build_strong_cast_assignment (tree lhs, tree build_unary_op (input_location, ADDR_EXPR, lhs, 0)), NULL_TREE)); - assemble_external (objc_assign_strong_cast_decl); return build_function_call (input_location, objc_assign_strong_cast_decl, func_params); } Index: objc-next-runtime-abi-01.c =================================================================== --- objc-next-runtime-abi-01.c (revision 185603) +++ objc-next-runtime-abi-01.c (working copy) @@ -977,7 +977,6 @@ next_runtime_abi_01_get_category_super_ref (locati /* else do it the slow way. */ add_class_reference (super_name); super_class = (inst_meth ? objc_get_class_decl : objc_get_meta_class_decl); -/* assemble_external (super_class);*/ super_name = my_build_string_pointer (IDENTIFIER_LENGTH (super_name) + 1, IDENTIFIER_POINTER (super_name)); /* super_class = objc_get{Meta}Class("CLASS_SUPER_NAME"); */ Index: objc-next-runtime-abi-02.c =================================================================== --- objc-next-runtime-abi-02.c (revision 185603) +++ objc-next-runtime-abi-02.c (working copy) @@ -1509,7 +1509,6 @@ next_runtime_abi_02_get_category_super_ref (locati /* ??? Do we need to add the class ref anway for zero-link? */ /* else do it the slow way. */ super_class = (inst_meth ? objc_get_class_decl : objc_get_meta_class_decl); - /* assemble_external (super_class); */ super_name = my_build_string_pointer (IDENTIFIER_LENGTH (super_name) + 1, IDENTIFIER_POINTER (super_name)); /* super_class = objc_get{Meta}Class("CLASS_SUPER_NAME"); */ Index: objc-gnu-runtime-abi-01.c =================================================================== --- objc-gnu-runtime-abi-01.c (revision 185603) +++ objc-gnu-runtime-abi-01.c (working copy) @@ -574,8 +574,6 @@ gnu_runtime_abi_01_get_class_reference (tree ident (IDENTIFIER_LENGTH (ident) + 1, IDENTIFIER_POINTER (ident))); - /* FIXME: Do we need this assemble_external() ? */ - /* assemble_external (objc_get_class_decl);*/ return build_function_call (input_location, objc_get_class_decl, params); } @@ -839,8 +837,6 @@ gnu_runtime_abi_01_get_category_super_ref (locatio add_class_reference (super_name); super_class = (inst_meth ? objc_get_class_decl : objc_get_meta_class_decl); - /* FIXME: Do we need this assemble_external() ? */ - /* assemble_external (super_class);*/ super_name = my_build_string_pointer (IDENTIFIER_LENGTH (super_name) + 1, IDENTIFIER_POINTER (super_name)); /* super_class = get_{meta_}class("CLASS_SUPER_NAME"); */