+2019-11-11 H.J. Lu <hjl.tools@gmail.com>
+
+ PR target/87833
+ * config/i386/intelmic-mkoffload.c (prepare_target_image): Put
+ -fPIC and -shared the last to create offload image.
+
2019-11-11 Thomas Schwinge <thomas@codesourcery.com>
* gimplify.c (gimplify_scan_omp_clauses): Assert 'offset2' instead
if (verbose)
obstack_ptr_grow (&argv_obstack, "-v");
obstack_ptr_grow (&argv_obstack, "-xlto");
- obstack_ptr_grow (&argv_obstack, "-shared");
- obstack_ptr_grow (&argv_obstack, "-fPIC");
obstack_ptr_grow (&argv_obstack, opt1);
for (int i = 1; i < argc; i++)
{
if (!out_obj_filename)
fatal_error (input_location, "output file not specified");
obstack_ptr_grow (&argv_obstack, opt2);
+ /* NB: Put -fPIC and -shared the last to create shared library. */
+ obstack_ptr_grow (&argv_obstack, "-fPIC");
+ obstack_ptr_grow (&argv_obstack, "-shared");
obstack_ptr_grow (&argv_obstack, "-o");
obstack_ptr_grow (&argv_obstack, target_so_filename);
compile_for_target (&argv_obstack);