Skip to content

Commit

Permalink
Merge pull request #5941 from grom72/obsolete-none-linux
Browse files Browse the repository at this point in the history
common: remove non-Linux support from all build paths
  • Loading branch information
janekmi authored Jul 11, 2024
2 parents 0f3c4ec + e50e870 commit 5a9c800
Show file tree
Hide file tree
Showing 13 changed files with 44 additions and 333 deletions.
6 changes: 6 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
XXX

* Version X.X.X

- remove non-Linux support from all compilation paths (OS_KERNEL_NAME)

Thu May 23 2024 Oksana Sałyk <oksana.salyk@intel.com>

* Version 2.1.0
Expand Down
6 changes: 0 additions & 6 deletions src/common.inc
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,6 @@ GCOV_LIBS=-lgcov

LIBS += $(EXTRA_LIBS)

ifeq ($(OS_KERNEL_NAME),)
export OS_KERNEL_NAME := $(shell uname -s)
endif

osdep = $(1)_$(shell echo $(OS_KERNEL_NAME) | tr "[:upper:]" "[:lower:]")$(2)

get_arch = $(shell $(CC) -dumpmachine | awk -F'[/-]' '{print $$1}')
ifeq ($(ARCH),)
export ARCH := $(call get_arch)
Expand Down
30 changes: 6 additions & 24 deletions src/common/pmemcommon.inc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright 2017-2019, Intel Corporation
# Copyright 2017-2023, Intel Corporation
#
# src/pmemcommon.inc -- common SOURCE definitions for PMDK libraries
#
Expand All @@ -22,37 +22,19 @@ SOURCE +=\
$(COMMON)/set.c\
$(COMMON)/shutdown_state.c\
$(COMMON)/uuid.c\
$(call osdep, $(COMMON)/uuid,.c)\
$(COMMON)/uuid_linux.c\
$(PMEM2)/pmem2_utils.c\
$(PMEM2)/config.c\
$(PMEM2)/persist_posix.c\
$(PMEM2)/badblocks.c\
$(PMEM2)/badblocks_$(OS_DIMM).c\
$(PMEM2)/usc_$(OS_DIMM).c\
$(PMEM2)/source.c\
$(PMEM2)/source_posix.c

ifeq ($(OS_KERNEL_NAME),Linux)
SOURCE +=\
$(PMEM2)/source_posix.c\
$(PMEM2)/auto_flush_linux.c\
$(PMEM2)/deep_flush_linux.c\
$(PMEM2)/extent_linux.c\
$(PMEM2)/pmem2_utils_linux.c\
$(PMEM2)/pmem2_utils_$(OS_DIMM).c
else
SOURCE +=\
$(PMEM2)/auto_flush_none.c\
$(PMEM2)/deep_flush_other.c\
$(PMEM2)/extent_none.c\
$(PMEM2)/pmem2_utils_other.c
endif

ifeq ($(OS_DIMM),ndctl)
SOURCE +=\
$(PMEM2)/region_namespace_ndctl.c\
$(PMEM2)/numa_ndctl.c
else
SOURCE +=\
$(PMEM2)/region_namespace_none.c\
$(PMEM2)/numa_none.c
endif
$(PMEM2)/pmem2_utils_$(OS_DIMM).c\
$(PMEM2)/region_namespace_$(OS_DIMM).c\
$(PMEM2)/numa_$(OS_DIMM).c
25 changes: 4 additions & 21 deletions src/libpmem/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,30 +34,13 @@ SOURCE =\
$(PMEM2)/config.c\
$(PMEM2)/persist_posix.c\
$(PMEM2)/source.c\
$(PMEM2)/source_posix.c

ifeq ($(OS_KERNEL_NAME),Linux)
SOURCE +=\
$(PMEM2)/source_posix.c\
$(PMEM2)/pmem2_utils_linux.c\
$(PMEM2)/pmem2_utils_$(OS_DIMM).c\
$(PMEM2)/auto_flush_linux.c\
$(PMEM2)/deep_flush_linux.c
else
SOURCE +=\
$(PMEM2)/pmem2_utils_other.c\
$(PMEM2)/auto_flush_none.c\
$(PMEM2)/deep_flush_other.c
endif

ifeq ($(OS_DIMM),ndctl)
SOURCE +=\
region_namespace_ndctl.c\
numa_ndctl.c
else
SOURCE +=\
region_namespace_none.c\
numa_none.c
endif
$(PMEM2)/deep_flush_linux.c\
$(PMEM2)/region_namespace_$(OS_DIMM).c\
$(PMEM2)/numa_$(OS_DIMM).c

INCS += -I$(TOP)/src/libpmem2

Expand Down
26 changes: 4 additions & 22 deletions src/libpmem2/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,32 +28,14 @@ SOURCE =\
source.c\
source_posix.c\
vm_reservation.c\
vm_reservation_posix.c

ifeq ($(OS_KERNEL_NAME),Linux)
SOURCE +=\
vm_reservation_posix.c\
auto_flush_linux.c\
deep_flush_linux.c\
extent_linux.c\
pmem2_utils_linux.c\
pmem2_utils_$(OS_DIMM).c
else
SOURCE +=\
auto_flush_none.c\
deep_flush_other.c\
extent_none.c\
pmem2_utils_other.c
endif

ifeq ($(OS_DIMM),ndctl)
SOURCE +=\
region_namespace_ndctl.c\
numa_ndctl.c
else
SOURCE +=\
region_namespace_none.c\
numa_none.c
endif
pmem2_utils_$(OS_DIMM).c\
region_namespace_$(OS_DIMM).c\
numa_$(OS_DIMM).c

include $(ARCH)/sources.inc

Expand Down
16 changes: 0 additions & 16 deletions src/libpmem2/auto_flush_none.c

This file was deleted.

49 changes: 0 additions & 49 deletions src/libpmem2/deep_flush_other.c

This file was deleted.

31 changes: 0 additions & 31 deletions src/libpmem2/extent_none.c

This file was deleted.

56 changes: 0 additions & 56 deletions src/libpmem2/pmem2_utils_other.c

This file was deleted.

Loading

0 comments on commit 5a9c800

Please sign in to comment.