Skip to content

Commit 5055d06

Browse files
authored
Move submodule to src/third_party and remove duplicated (eunomia-bpf#65)
* add submodule * fix duplicate submodule * fix submodule and remove duplicate code * fix blazsym version
1 parent bf4fa6f commit 5055d06

File tree

47 files changed

+79
-787
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+79
-787
lines changed

.gitmodules

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
[submodule "libbpf"]
2-
path = libbpf
1+
[submodule "src/third_party/blazesym"]
2+
path = src/third_party/blazesym
3+
url = https://github.com/libbpf/blazesym
4+
[submodule "src/third_party/libbpf"]
5+
path = src/third_party/libbpf
36
url = https://github.com/libbpf/libbpf.git
4-
[submodule "bpftool"]
5-
path = bpftool
7+
[submodule "src/third_party/bpftool"]
8+
path = src/third_party/bpftool
69
url = https://github.com/libbpf/bpftool
7-
[submodule "blazesym"]
8-
path = blazesym
9-
url = https://github.com/libbpf/blazesym

bpftool

-1
This file was deleted.

libbpf

-1
This file was deleted.

src/11-bootstrap/Makefile

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause)
22
OUTPUT := .output
33
CLANG ?= clang
4-
LIBBPF_SRC := $(abspath ../../libbpf/src)
5-
BPFTOOL_SRC := $(abspath ../../bpftool/src)
4+
LIBBPF_SRC := $(abspath ../third_party/libbpf/src)
5+
BPFTOOL_SRC := $(abspath ../third_party/bpftool/src)
66
LIBBPF_OBJ := $(abspath $(OUTPUT)/libbpf.a)
77
BPFTOOL_OUTPUT ?= $(abspath $(OUTPUT)/bpftool)
88
BPFTOOL ?= $(BPFTOOL_OUTPUT)/bootstrap/bpftool
9-
LIBBLAZESYM_SRC := $(abspath ../../blazesym/)
9+
LIBBLAZESYM_SRC := $(abspath ../third_party/blazesym/)
1010
LIBBLAZESYM_OBJ := $(abspath $(OUTPUT)/libblazesym.a)
1111
LIBBLAZESYM_HEADER := $(abspath $(OUTPUT)/blazesym.h)
1212
ARCH ?= $(shell uname -m | sed 's/x86_64/x86/' \
@@ -16,11 +16,11 @@ ARCH ?= $(shell uname -m | sed 's/x86_64/x86/' \
1616
| sed 's/mips.*/mips/' \
1717
| sed 's/riscv64/riscv/' \
1818
| sed 's/loongarch64/loongarch/')
19-
VMLINUX := ../../vmlinux/$(ARCH)/vmlinux.h
19+
VMLINUX := ../third_party/vmlinux/$(ARCH)/vmlinux.h
2020
# Use our own libbpf API headers and Linux UAPI headers distributed with
2121
# libbpf to avoid dependency on system-wide headers, which could be missing or
2222
# outdated
23-
INCLUDES := -I$(OUTPUT) -I../../libbpf/include/uapi -I$(dir $(VMLINUX))
23+
INCLUDES := -I$(OUTPUT) -I../third_party/libbpf/include/uapi -I$(dir $(VMLINUX))
2424
CFLAGS := -g -Wall
2525
ALL_LDFLAGS := $(LDFLAGS) $(EXTRA_LDFLAGS)
2626

src/12-profile/Makefile

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause)
22
OUTPUT := .output
33
CLANG ?= clang
4-
LIBBPF_SRC := $(abspath ../../libbpf/src)
5-
BPFTOOL_SRC := $(abspath ../../bpftool/src)
4+
LIBBPF_SRC := $(abspath ../third_party/libbpf/src)
5+
BPFTOOL_SRC := $(abspath ../third_party/bpftool/src)
66
LIBBPF_OBJ := $(abspath $(OUTPUT)/libbpf.a)
77
BPFTOOL_OUTPUT ?= $(abspath $(OUTPUT)/bpftool)
88
BPFTOOL ?= $(BPFTOOL_OUTPUT)/bootstrap/bpftool
9-
LIBBLAZESYM_SRC := $(abspath ../../blazesym/)
9+
LIBBLAZESYM_SRC := $(abspath ../third_party/blazesym/)
1010
LIBBLAZESYM_OBJ := $(abspath $(OUTPUT)/libblazesym.a)
1111
LIBBLAZESYM_HEADER := $(abspath $(OUTPUT)/blazesym.h)
1212
ARCH ?= $(shell uname -m | sed 's/x86_64/x86/' \
@@ -16,11 +16,11 @@ ARCH ?= $(shell uname -m | sed 's/x86_64/x86/' \
1616
| sed 's/mips.*/mips/' \
1717
| sed 's/riscv64/riscv/' \
1818
| sed 's/loongarch64/loongarch/')
19-
VMLINUX := ../../vmlinux/$(ARCH)/vmlinux.h
19+
VMLINUX := ../third_party/vmlinux/$(ARCH)/vmlinux.h
2020
# Use our own libbpf API headers and Linux UAPI headers distributed with
2121
# libbpf to avoid dependency on system-wide headers, which could be missing or
2222
# outdated
23-
INCLUDES := -I$(OUTPUT) -I../../libbpf/include/uapi -I$(dir $(VMLINUX))
23+
INCLUDES := -I$(OUTPUT) -I../third_party/libbpf/include/uapi -I$(dir $(VMLINUX))
2424
CFLAGS := -g -Wall
2525
ALL_LDFLAGS := $(LDFLAGS) $(EXTRA_LDFLAGS)
2626

src/13-tcpconnlat/Makefile

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause)
22
OUTPUT := .output
33
CLANG ?= clang
4-
LIBBPF_SRC := $(abspath ../../libbpf/src)
5-
BPFTOOL_SRC := $(abspath ../../bpftool/src)
4+
LIBBPF_SRC := $(abspath ../third_party/libbpf/src)
5+
BPFTOOL_SRC := $(abspath ../third_party/bpftool/src)
66
LIBBPF_OBJ := $(abspath $(OUTPUT)/libbpf.a)
77
BPFTOOL_OUTPUT ?= $(abspath $(OUTPUT)/bpftool)
88
BPFTOOL ?= $(BPFTOOL_OUTPUT)/bootstrap/bpftool
9-
LIBBLAZESYM_SRC := $(abspath ../../blazesym/)
9+
LIBBLAZESYM_SRC := $(abspath ../third_party/blazesym/)
1010
LIBBLAZESYM_OBJ := $(abspath $(OUTPUT)/libblazesym.a)
1111
LIBBLAZESYM_HEADER := $(abspath $(OUTPUT)/blazesym.h)
1212
ARCH ?= $(shell uname -m | sed 's/x86_64/x86/' \
@@ -16,11 +16,11 @@ ARCH ?= $(shell uname -m | sed 's/x86_64/x86/' \
1616
| sed 's/mips.*/mips/' \
1717
| sed 's/riscv64/riscv/' \
1818
| sed 's/loongarch64/loongarch/')
19-
VMLINUX := ../../vmlinux/$(ARCH)/vmlinux.h
19+
VMLINUX := ../third_party/vmlinux/$(ARCH)/vmlinux.h
2020
# Use our own libbpf API headers and Linux UAPI headers distributed with
2121
# libbpf to avoid dependency on system-wide headers, which could be missing or
2222
# outdated
23-
INCLUDES := -I$(OUTPUT) -I../../libbpf/include/uapi -I$(dir $(VMLINUX))
23+
INCLUDES := -I$(OUTPUT) -I../third_party/libbpf/include/uapi -I$(dir $(VMLINUX))
2424
CFLAGS := -g -Wall
2525
ALL_LDFLAGS := $(LDFLAGS) $(EXTRA_LDFLAGS)
2626

src/14-tcpstates/Makefile

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause)
22
OUTPUT := .output
33
CLANG ?= clang
4-
LIBBPF_SRC := $(abspath ../../libbpf/src)
5-
BPFTOOL_SRC := $(abspath ../../bpftool/src)
4+
LIBBPF_SRC := $(abspath ../third_party/libbpf/src)
5+
BPFTOOL_SRC := $(abspath ../third_party/bpftool/src)
66
LIBBPF_OBJ := $(abspath $(OUTPUT)/libbpf.a)
77
BPFTOOL_OUTPUT ?= $(abspath $(OUTPUT)/bpftool)
88
BPFTOOL ?= $(BPFTOOL_OUTPUT)/bootstrap/bpftool
9-
LIBBLAZESYM_SRC := $(abspath ../../blazesym/)
9+
LIBBLAZESYM_SRC := $(abspath ../third_party/blazesym/)
1010
LIBBLAZESYM_OBJ := $(abspath $(OUTPUT)/libblazesym.a)
1111
LIBBLAZESYM_HEADER := $(abspath $(OUTPUT)/blazesym.h)
1212
ARCH ?= $(shell uname -m | sed 's/x86_64/x86/' \
@@ -16,11 +16,11 @@ ARCH ?= $(shell uname -m | sed 's/x86_64/x86/' \
1616
| sed 's/mips.*/mips/' \
1717
| sed 's/riscv64/riscv/' \
1818
| sed 's/loongarch64/loongarch/')
19-
VMLINUX := ../../vmlinux/$(ARCH)/vmlinux.h
19+
VMLINUX := ../third_party/vmlinux/$(ARCH)/vmlinux.h
2020
# Use our own libbpf API headers and Linux UAPI headers distributed with
2121
# libbpf to avoid dependency on system-wide headers, which could be missing or
2222
# outdated
23-
INCLUDES := -I$(OUTPUT) -I../../libbpf/include/uapi -I$(dir $(VMLINUX))
23+
INCLUDES := -I$(OUTPUT) -I../third_party/libbpf/include/uapi -I$(dir $(VMLINUX))
2424
CFLAGS := -g -Wall
2525
ALL_LDFLAGS := $(LDFLAGS) $(EXTRA_LDFLAGS)
2626

src/15-javagc/Makefile

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause)
22
OUTPUT := .output
33
CLANG ?= clang
4-
LIBBPF_SRC := $(abspath ../../libbpf/src)
5-
BPFTOOL_SRC := $(abspath ../../bpftool/src)
4+
LIBBPF_SRC := $(abspath ../third_party/libbpf/src)
5+
BPFTOOL_SRC := $(abspath ../third_party/bpftool/src)
66
LIBBPF_OBJ := $(abspath $(OUTPUT)/libbpf.a)
77
BPFTOOL_OUTPUT ?= $(abspath $(OUTPUT)/bpftool)
88
BPFTOOL ?= $(BPFTOOL_OUTPUT)/bootstrap/bpftool
9-
LIBBLAZESYM_SRC := $(abspath ../../blazesym/)
9+
LIBBLAZESYM_SRC := $(abspath ../third_party/blazesym/)
1010
LIBBLAZESYM_OBJ := $(abspath $(OUTPUT)/libblazesym.a)
1111
LIBBLAZESYM_HEADER := $(abspath $(OUTPUT)/blazesym.h)
1212
ARCH ?= $(shell uname -m | sed 's/x86_64/x86/' \
@@ -16,11 +16,11 @@ ARCH ?= $(shell uname -m | sed 's/x86_64/x86/' \
1616
| sed 's/mips.*/mips/' \
1717
| sed 's/riscv64/riscv/' \
1818
| sed 's/loongarch64/loongarch/')
19-
VMLINUX := ../../vmlinux/$(ARCH)/vmlinux.h
19+
VMLINUX := ../third_party/vmlinux/$(ARCH)/vmlinux.h
2020
# Use our own libbpf API headers and Linux UAPI headers distributed with
2121
# libbpf to avoid dependency on system-wide headers, which could be missing or
2222
# outdated
23-
INCLUDES := -I$(OUTPUT) -I../../libbpf/include/uapi -I$(dir $(VMLINUX))
23+
INCLUDES := -I$(OUTPUT) -I../third_party/libbpf/include/uapi -I$(dir $(VMLINUX))
2424
CFLAGS := -g -Wall
2525
ALL_LDFLAGS := $(LDFLAGS) $(EXTRA_LDFLAGS)
2626

src/16-memleak/Makefile

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause)
22
OUTPUT := .output
33
CLANG ?= clang
4-
LIBBPF_SRC := $(abspath ../../libbpf/src)
5-
BPFTOOL_SRC := $(abspath ../../bpftool/src)
4+
LIBBPF_SRC := $(abspath ../third_party/libbpf/src)
5+
BPFTOOL_SRC := $(abspath ../third_party/bpftool/src)
66
LIBBPF_OBJ := $(abspath $(OUTPUT)/libbpf.a)
77
BPFTOOL_OUTPUT ?= $(abspath $(OUTPUT)/bpftool)
88
BPFTOOL ?= $(BPFTOOL_OUTPUT)/bootstrap/bpftool
9-
LIBBLAZESYM_SRC := $(abspath ../../blazesym/)
9+
LIBBLAZESYM_SRC := $(abspath ../third_party/blazesym/)
1010
LIBBLAZESYM_OBJ := $(abspath $(OUTPUT)/libblazesym.a)
1111
LIBBLAZESYM_HEADER := $(abspath $(OUTPUT)/blazesym.h)
1212
ARCH ?= $(shell uname -m | sed 's/x86_64/x86/' \
@@ -16,11 +16,11 @@ ARCH ?= $(shell uname -m | sed 's/x86_64/x86/' \
1616
| sed 's/mips.*/mips/' \
1717
| sed 's/riscv64/riscv/' \
1818
| sed 's/loongarch64/loongarch/')
19-
VMLINUX := ../../vmlinux/$(ARCH)/vmlinux.h
19+
VMLINUX := ../third_party/vmlinux/$(ARCH)/vmlinux.h
2020
# Use our own libbpf API headers and Linux UAPI headers distributed with
2121
# libbpf to avoid dependency on system-wide headers, which could be missing or
2222
# outdated
23-
INCLUDES := -I$(OUTPUT) -I../../libbpf/include/uapi -I$(dir $(VMLINUX))
23+
INCLUDES := -I$(OUTPUT) -I../third_party/libbpf/include/uapi -I$(dir $(VMLINUX))
2424
CFLAGS := -g -Wall
2525
ALL_LDFLAGS := $(LDFLAGS) $(EXTRA_LDFLAGS)
2626

src/17-biopattern/Makefile

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause)
22
OUTPUT := .output
33
CLANG ?= clang
4-
LIBBPF_SRC := $(abspath ../../libbpf/src)
5-
BPFTOOL_SRC := $(abspath ../../bpftool/src)
4+
LIBBPF_SRC := $(abspath ../third_party/libbpf/src)
5+
BPFTOOL_SRC := $(abspath ../third_party/bpftool/src)
66
LIBBPF_OBJ := $(abspath $(OUTPUT)/libbpf.a)
77
BPFTOOL_OUTPUT ?= $(abspath $(OUTPUT)/bpftool)
88
BPFTOOL ?= $(BPFTOOL_OUTPUT)/bootstrap/bpftool
9-
LIBBLAZESYM_SRC := $(abspath ../../blazesym/)
9+
LIBBLAZESYM_SRC := $(abspath ../third_party/blazesym/)
1010
LIBBLAZESYM_OBJ := $(abspath $(OUTPUT)/libblazesym.a)
1111
LIBBLAZESYM_HEADER := $(abspath $(OUTPUT)/blazesym.h)
1212
ARCH ?= $(shell uname -m | sed 's/x86_64/x86/' \
@@ -16,11 +16,11 @@ ARCH ?= $(shell uname -m | sed 's/x86_64/x86/' \
1616
| sed 's/mips.*/mips/' \
1717
| sed 's/riscv64/riscv/' \
1818
| sed 's/loongarch64/loongarch/')
19-
VMLINUX := ../../vmlinux/$(ARCH)/vmlinux.h
19+
VMLINUX := ../third_party/vmlinux/$(ARCH)/vmlinux.h
2020
# Use our own libbpf API headers and Linux UAPI headers distributed with
2121
# libbpf to avoid dependency on system-wide headers, which could be missing or
2222
# outdated
23-
INCLUDES := -I$(OUTPUT) -I../../libbpf/include/uapi -I$(dir $(VMLINUX))
23+
INCLUDES := -I$(OUTPUT) -I../third_party/libbpf/include/uapi -I$(dir $(VMLINUX))
2424
CFLAGS := -g -Wall
2525
ALL_LDFLAGS := $(LDFLAGS) $(EXTRA_LDFLAGS)
2626

src/24-hide/Makefile

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause)
22
OUTPUT := .output
33
CLANG ?= clang
4-
LIBBPF_SRC := $(abspath ../../libbpf/src)
5-
BPFTOOL_SRC := $(abspath ../../bpftool/src)
4+
LIBBPF_SRC := $(abspath ../third_party/libbpf/src)
5+
BPFTOOL_SRC := $(abspath ../third_party/bpftool/src)
66
LIBBPF_OBJ := $(abspath $(OUTPUT)/libbpf.a)
77
BPFTOOL_OUTPUT ?= $(abspath $(OUTPUT)/bpftool)
88
BPFTOOL ?= $(BPFTOOL_OUTPUT)/bootstrap/bpftool
9-
LIBBLAZESYM_SRC := $(abspath ../../blazesym/)
9+
LIBBLAZESYM_SRC := $(abspath ../third_party/blazesym/)
1010
LIBBLAZESYM_OBJ := $(abspath $(OUTPUT)/libblazesym.a)
1111
LIBBLAZESYM_HEADER := $(abspath $(OUTPUT)/blazesym.h)
1212
ARCH ?= $(shell uname -m | sed 's/x86_64/x86/' \
@@ -16,11 +16,11 @@ ARCH ?= $(shell uname -m | sed 's/x86_64/x86/' \
1616
| sed 's/mips.*/mips/' \
1717
| sed 's/riscv64/riscv/' \
1818
| sed 's/loongarch64/loongarch/')
19-
VMLINUX := ../../vmlinux/$(ARCH)/vmlinux.h
19+
VMLINUX := ../third_party/vmlinux/$(ARCH)/vmlinux.h
2020
# Use our own libbpf API headers and Linux UAPI headers distributed with
2121
# libbpf to avoid dependency on system-wide headers, which could be missing or
2222
# outdated
23-
INCLUDES := -I$(OUTPUT) -I../../libbpf/include/uapi -I$(dir $(VMLINUX))
23+
INCLUDES := -I$(OUTPUT) -I../third_party/libbpf/include/uapi -I$(dir $(VMLINUX))
2424
CFLAGS := -g -Wall
2525
ALL_LDFLAGS := $(LDFLAGS) $(EXTRA_LDFLAGS)
2626

0 commit comments

Comments
 (0)