Skip to content

-output-obj should support autolink #6797

@vicuna

Description

@vicuna

Original bug ID: 6797
Reporter: @whitequark
Assigned to: @damiendoligez
Status: closed (set by @xavierleroy on 2017-02-16T14:18:15Z)
Resolution: fixed
Priority: normal
Severity: minor
Target version: 4.02.2+dev / +rc1
Fixed in version: 4.02.2+dev / +rc1
Category: ~DO NOT USE (was: OCaml general)
Tags: patch
Related to: #6625 #6733 #6796 #6918 #6929
Monitored by: @gasche

Bug description

As I've just realized, in #6733 I actually abused -output-obj: the compiler thought it was building an executable and thus invoked gcc and not ld -r ($PARTIALLD in Makefile.config). Thus it also linked in the runtime and most importantly the C stubs.

In fact if you try to use -output-obj as "intended", it doesn't link in the runtime, which is not too problematic, but also it doesn't link in the C stubs. It is unreasonable to expect the user to hunt down the C stubs manually and link them in explicitly, therefore I think -output-obj is completely broken.

File attachments

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions