10 Star 0 Fork 18

src-openEuler/ppp

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
backport-0027-Set-LIBDIR-for-RISCV.patch 3.72 KB
一键复制 编辑 原始数据 按行查看 历史
laokz 提交于 2年前 . fix riscv64 patch
From 05cf58cd46b3c92e868d856931b0ee5d2bfc7d72 Mon Sep 17 00:00:00 2001
From: whoisxxx <zhangxuzhou4@huawei.com>
Date: Tue, 10 Nov 2020 02:47:11 +0000
Subject: [PATCH] Set LIBDIR for riscv
The LIBDIR is given by "$(CC) -print-os-multi-directory", which
result in "../lib64" on X86/aarch64 host, and "./" on an openEuler
RISC-V host. Here is a temproray apporach by hardcore it for
an RISC-V host.
Signed-off-by: whoisxxx <zhangxuzhou4@huawei.com>
---
rebased-by: laokz <zhangkai@iscas.ac.cn>
diff --git a/pppd/Makefile.linux b/pppd/Makefile.linux
index 07df6a7..7dd3a1b 100644
--- a/pppd/Makefile.linux
+++ b/pppd/Makefile.linux
@@ -12,7 +12,11 @@ DESTDIR = $(INSTROOT)@DESTDIR@
BINDIR = $(DESTDIR)/sbin
MANDIR = $(DESTDIR)/share/man/man8
INCDIR = $(DESTDIR)/include
+ifeq ($(filter riscv64%,$(MAKE_HOST)),)
LIBDIR = $(DESTDIR)/lib/$(shell gcc -print-multi-os-directory 2> /dev/null)
+else
+LIBDIR = $(DESTDIR)/lib64
+endif
TARGETS = pppd
diff --git a/pppd/plugins/Makefile.linux b/pppd/plugins/Makefile.linux
index f42d18c..958923f 100644
--- a/pppd/plugins/Makefile.linux
+++ b/pppd/plugins/Makefile.linux
@@ -5,7 +5,11 @@ COPTS=@CFLAGS@
DESTDIR = $(INSTROOT)@DESTDIR@
BINDIR = $(DESTDIR)/sbin
MANDIR = $(DESTDIR)/share/man/man8
+ifeq ($(filter riscv64%,$(MAKE_HOST)),)
LIBDIR = $(DESTDIR)/lib/$(shell gcc -print-multi-os-directory 2> /dev/null)/pppd/$(VERSION)
+else
+LIBDIR = $(DESTDIR)/lib64/pppd/$(VERSION)
+endif
CFLAGS = $(COPTS) -I.. -I../../include -fPIC
LDFLAGS_SHARED = -shared
diff --git a/pppd/plugins/pppoatm/Makefile.linux b/pppd/plugins/pppoatm/Makefile.linux
index 6387970..daaaa4e 100644
--- a/pppd/plugins/pppoatm/Makefile.linux
+++ b/pppd/plugins/pppoatm/Makefile.linux
@@ -4,7 +4,11 @@ CC=$(CROSS_COMPILE)@CC@
COPTS=@CFLAGS@
DESTDIR = $(INSTROOT)@DESTDIR@
+ifeq ($(filter riscv64%,$(MAKE_HOST)),)
LIBDIR = $(DESTDIR)/lib/$(shell gcc -print-multi-os-directory 2> /dev/null)/pppd/$(VERSION)
+else
+LIBDIR = $(DESTDIR)/lib64/pppd/$(VERSION)
+endif
VERSION = $(shell awk -F '"' '/VERSION/ { print $$2; }' ../../patchlevel.h)
diff --git a/pppd/plugins/pppoe/Makefile.linux b/pppd/plugins/pppoe/Makefile.linux
index 6cb8397..af5f9fb 100644
--- a/pppd/plugins/pppoe/Makefile.linux
+++ b/pppd/plugins/pppoe/Makefile.linux
@@ -19,7 +19,11 @@ COPTS=@CFLAGS@
DESTDIR = $(INSTROOT)@DESTDIR@
BINDIR = $(DESTDIR)/sbin
MANDIR = $(DESTDIR)/share/man/man8
+ifeq ($(filter riscv64%,$(MAKE_HOST)),)
LIBDIR = $(DESTDIR)/lib/$(shell gcc -print-multi-os-directory 2> /dev/null)/pppd/$(PPPDVERSION)
+else
+LIBDIR = $(DESTDIR)/lib64/pppd/$(PPPDVERSION)
+endif
PPPDVERSION = $(shell awk -F '"' '/VERSION/ { print $$2; }' ../../patchlevel.h)
diff --git a/pppd/plugins/pppol2tp/Makefile.linux b/pppd/plugins/pppol2tp/Makefile.linux
index e4442f9..d9ae2ca 100644
--- a/pppd/plugins/pppol2tp/Makefile.linux
+++ b/pppd/plugins/pppol2tp/Makefile.linux
@@ -4,7 +4,11 @@ CC=$(CROSS_COMPILE)@CC@
COPTS=@CFLAGS@
DESTDIR = $(INSTROOT)/@DESTDIR@
+ifeq ($(filter riscv64%,$(MAKE_HOST)),)
LIBDIR = $(DESTDIR)/lib/$(shell gcc -print-multi-os-directory 2> /dev/null)/pppd/$(VERSION)
+else
+LIBDIR = $(DESTDIR)/lib64/pppd/$(VERSION)
+endif
VERSION = $(shell awk -F '"' '/VERSION/ { print $$2; }' ../../patchlevel.h)
diff --git a/pppd/plugins/radius/Makefile.linux b/pppd/plugins/radius/Makefile.linux
index d2ef044..1ccc171 100644
--- a/pppd/plugins/radius/Makefile.linux
+++ b/pppd/plugins/radius/Makefile.linux
@@ -9,7 +9,11 @@ COPTS=@CFLAGS@
DESTDIR = $(INSTROOT)@DESTDIR@
MANDIR = $(DESTDIR)/share/man/man8
+ifeq ($(filter riscv64%,$(MAKE_HOST)),)
LIBDIR = $(DESTDIR)/lib/$(shell gcc -print-multi-os-directory 2> /dev/null)/pppd/$(VERSION)
+else
+LIBDIR = $(DESTDIR)/lib64/pppd/$(VERSION)
+endif
VERSION = $(shell awk -F '"' '/VERSION/ { print $$2; }' ../../patchlevel.h)
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/src-openeuler/ppp.git
git@gitee.com:src-openeuler/ppp.git
src-openeuler
ppp
ppp
openEuler-22.03-LTS

搜索帮助