Step 2: base tools: devel/binutils

This commit is contained in:
2015-04-26 20:01:25 +00:00
committed by Lionel Sambuc
parent 634d7550c3
commit c847a2cd2d
127 changed files with 3578 additions and 351 deletions

View File

@@ -0,0 +1,43 @@
$NetBSD$
--- gold/plugin.cc.orig Tue Jun 12 22:52:41 2012
+++ gold/plugin.cc
@@ -29,8 +29,38 @@
#include <vector>
#ifdef ENABLE_PLUGINS
+#ifdef HAVE_DLFCN_H
#include <dlfcn.h>
+#elif defined (HAVE_WINDOWS_H)
+#include <windows.h>
+#else
+#error Unknown how to handle dynamic-load-libraries.
#endif
+
+#if !defined (HAVE_DLFCN_H) && defined (HAVE_WINDOWS_H)
+
+#define RTLD_NOW 0 /* Dummy value. */
+static void *
+dlopen(const char *file, int mode ATTRIBUTE_UNUSED)
+{
+ return LoadLibrary(file);
+}
+
+static void *
+dlsym(void *handle, const char *name)
+{
+ return reinterpret_cast<void *>(
+ GetProcAddress(static_cast<HMODULE>(handle),name));
+}
+
+static const char *
+dlerror(void)
+{
+ return "unable to load dll";
+}
+
+#endif /* !defined (HAVE_DLFCN_H) && defined (HAVE_WINDOWS_H) */
+#endif /* ENABLE_PLUGINS */
#include "parameters.h"
#include "errors.h"