[erlang-patches] Erlang build issue on OpenBSD -current

Björn-Egil Dahlberg <>
Thu Sep 6 11:46:04 CEST 2012


On 2012-09-04 20:58, Matthew Dempsky wrote:
> On OpenBSD, shared objects should be linked with "cc -shared", not "ld
> -shared".  This is particularly important now that OpenBSD's C
> compiler emits code that depends on crtbeginS.o/crtendS.o much more
> frequently than before, and those object files are not linked in by
> default when "ld -shared".
>
> Diff below tested on OpenBSD 5.2-current.  Excuse the sloppy
> copy/paste whitespace, but it's a trivial patch and I think it needs
> to be applied to erts/configure.in instead of erts/configure anyway.
>
> Cheers!
>
> --- erts/configure.orig Tue Sep  4 11:35:01 2012
> +++ erts/configure      Tue Sep  4 11:35:01 2012
> @@ -35122,6 +35122,10 @@ case $host_os in
>                          DED_LDFLAGS="-m32 $DED_LDFLAGS"
>                  fi
>          ;;
> +       openbsd*)
> +               DED_LD="$CC"
> +               DED_LDFLAGS="-shared"
> +       ;;
>          osf*)
>                  # NOTE! Whitespace after -rpath is important.
>                  DED_LD_FLAG_RUNTIME_LIBRARY_PATH="-rpath "
Thank you for reporting this.
I'll create a ticket and fix for it.

// Björn-Egil
    Erlang/OTP
> _______________________________________________
> erlang-patches mailing list
> 
> http://erlang.org/mailman/listinfo/erlang-patches
>
>



More information about the erlang-patches mailing list